Re:XML is not S-Expressions
by michaelneale on Monday January 12, 2009 @11:29PM
(#431628)
I have found using a lib to process MS document formats from binary is easier then direct XML. The XML formats look more like a memory dump then a marked up document.
[ Parent
| on HN ]
Well, that's OOXML. MS chose to employ the pure content model, so that text nodes and elements cannot be mixed as children of a root element. That leads to monstrosities like this (I forgot the actual element names, so I made them up):
<p>
<t>This is not bold.</t>
<t><b>This is.</b></t>
<t>This isn't.</t>
</p>
In a mixed content model schema, you could omit the extraneous <t> elements and just directly embed text nodes: <p>
This is isn't bold.
<b>This is.</b>
This isn't either.
</p>
That's just one of the many ways in which MS misused XML to make things worse instead of better.
Re:XML is not S-Expressions
by michaelneale on Tuesday January 13, 2009 @04:56AM
(#431870)
Actually yes, now you mention it it was Open Office XML. In any case you still need a library to help you out, its really not that easy to go straight to the XML (at least for the casual user - I guess for implementers its another matter).