Order matters in xml



  • attribute order matters... ?!

     

    its a good thing we use such a fantastic system called interwoven teamsite, they teach me things about xml which i have never learned.  


  • Winner of the 2016 Presidential Election

    Re: learn something(wtf) new every day

    It sounds like they're trying to blame a limitation of their bad parser on the XML specification.



  • Most likely the parser...  I don't understand why so many companies write their own parsers when there are so many free ones out there.  The XML spec explicitly states that attributes are unordered, so somebody was just making things up.



  • It says there are four elements and then there are only three listed.



  • We have a data pool which has some bizarre XML requirements.

    Its XML format looks something like this:

    <ROOT>
      <DOCUMENT>
        <ACTION type="add">
           ...
        </ACTION>
      </DOCUMENT>
      <DOCUMENT>
        <ACTION type="publish">
           ...
        </ACTION>
      </DOCUMENT>
      ...
    

    Where there is a limit of 1000 DOCUMENT elements. The weird thing, though, is that the documents are processed in file order, but publish actions are dependent on add actions. So even though it should, intuitively, parse all add actions before parsing any publish actions, it doesn't. Things like this aren't so much WTFs are they are sad, though.



  • It'd be easy to explain the 1000 element limit if somebody was overconcerned about memory use.  OTOH, it'd be easy to explain the in order requirement if somebody is a stream parser nazi (DOM IS EVIL EVIL EVIL!).

    Every time somebody implements an ad-hoc, non-compliant XML parser, James Clark weeps for our souls.


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.