Forcing a CDATA section

Richard Gaywood <[email protected]>
Newsgroups gmane.comp.java.jdom.general
Message-ID <[email protected]>
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.

Cheers!

Richard

_______________________________________________
To control your jdom-interest membership:
http://www.jdom.org/mailman/options/jdom-interest/[email protected]
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.