Re: Forcing a CDATA section
Paul Libbrecht <[email protected]>
| Newsgroups | gmane.comp.java.jdom.general |
|---|---|
| Message-ID | <[email protected]> |
I strongly believe the CDATA class serves that purpose. And, honestly, if it doesn't, it would be a child-game to modify the XMLOutputter to do so. paul Le 31-mars-10 à 17:22, Richard Gaywood a écrit : > Hi there. > > I am using JDOM to integrate with an API provided to me by a big > travel firm. My integration was working fine for my test cases, but > failed QA when the tester tried something different. I've now been > told by the travel firm that instead of sending > > <Key>N GBTM00423004Z</Key> > I need to send > <Key><![CDATA[N GBTM00423004Z]]></Key> > > Googling has only turned up flamewars on this mailing list about > this issue, and I cannot see anything about it in the JDOM API docs. > So I ask: is there currently a way to force JDOM to use a CDATA > section for a given tag, even where it shouldn't really be necessary? > > And before anyone starts another flamewar, I know this is dumb, I > know this isn't clean XML, but the travel firm is a big > multinational with a hojillion employees that makes zillions of > dollars a year. My employer is a small ecommerce outfit. I cannot > make them change this, as much as I would like to. It could be > worse; one of their competitors we wrote a connector to only > supports socket connections that take EDIFACT encoded strings, and > they ship us a closed-source binary C library to enable us to talk > to the service. Integrating Java into that was a barrel of laughs. _______________________________________________ To control your jdom-interest membership: http://www.jdom.org/mailman/options/jdom-interest/[email protected]