Monday August 25, 2003
|
Vanity Foul Dedicated to the wanderings of an egotistical mind. |
|
Atom and XOM Digester wasn't cutting it (haven't received that custom Rule yet), so I thought I'd try XOM. Well, XOM thinks the example Entry isn't WellFormed: I don't know what isn't well-formed about that, but since <content> could contain "nasty" non-X HTML, wellformedness shouldn't be a requirement (damn users, can never count on them to do the right thing!). My search for another solution will continue tonight (Jason, wanna send me that package your mentioned in my comments?). Good night, and thanks for your support.
Trackback URL: http://www.brainopolis.com/roller/trackback/lance/Weblog/atom_and_xom
|
|
||||
Posted by Tassos Bassoukos on August 27, 2003 at 05:45 AM CDT #
Posted by Lance on August 27, 2003 at 08:44 AM CDT #
XOM is telling you something here that you really need to listen to. It is simply not legal to put a less than sign in raw, unescaped XML content, ever. If the user types in a less than sign, then you need to escape it. I'm not sure how your application works, but if you use XOM to create the xontent in the first place; i.e. something like:
Element element = new Element("content");element.appendChild(userInputString);
then XOM will automatically escape the string for you. If you receive an "XML" document in which the < isn't escaped or hidden inside a CDATA section, then the document is malformed and no conformant XML parser will accept it. This is a deliberate design decision in XML which is inherited by all vocabularies that use XML including RSS.
Posted by Elliotte Rusty Harold on November 30, 2003 at 06:30 AM CST
Website: http://www.cafeconleche.org/XOM/ #
Posted by Lance on November 30, 2003 at 08:52 AM CST #