[Python-ideas] Let's be more orderly!

Greg Ewing greg.ewing at canterbury.ac.nz
Thu May 16 04:26:46 CEST 2013


On 16/05/13 07:35, Don Spaulding wrote:
> So someone else has built a system around an XML parser that
> doesn't know that sibling elements aren't guaranteed to appear in any
> particular order.

Are you *sure* those elements aren't required to appear in a
particular order? It depends on how the DTD is written. The
parser may actually be doing the right thing based on the
DTD it was given or based on.

 From http://www.w3schools.com/dtd/dtd_elements.asp:

   Elements with Children (sequences)

   Elements with one or more children are declared with the name of the
   children elements inside parentheses:

   <!ELEMENT element-name (child1,child2,...)>

   When children are declared in a sequence separated by commas, the children
   must appear in the same sequence in the document.

-- 
Greg


More information about the Python-ideas mailing list