I can't be sure that there are actually going to be "\r" in the data so I don't know if I should them or not.
-----Original Message----- From: Brian W. Young [mailto:[EMAIL PROTECTED]] Sent: Tuesday, September 17, 2002 6:07 PM To: Inns, Jeff Cc: '[EMAIL PROTECTED]' Subject: Re: [dom4j-user] CDATA, Carriage Returns and Line Feeds I'm not sure there is a way around this. I experienced the same thing a while back and ended up having to use a ReplaceString("\n", "\r\n") method. Quite a hack but it seemed the only way around it. Looked like most of the XML parsers out there would get rid of the CR. Sorry.... Inns, Jeff wrote: >I am experiencing a problem when I parse an XML document that contains a >CDATA section. The CDATA section in the DOM model does not contain the >same content as the physical XML document. The CDATA section is the >content of an Element. > >The CDATA section in the physical XML document contains carriage returns >and line feeds. However, after the file is parsed and I access the >CDATA section (by means of Element.getText() - or - Element.getData()), >the carriage return characters are gone and only the line feed >characters are left. It appears that the parser is removing the >carriage returns. > >It should be noted that I am using DOM4J to create the XML document that >I am parsing. In other words, I use DOM4J to create the xml document, >persist it to disk using XMLWriter; then another process comes along and >uses DOM4J to parse and read the document. > >The OS is Win2K, JVM is Sun 1.4.0_01, DOM4J version is the latest >nightly build as of 1:00 PM EST 9/17/2002. > >I doubt this is a DOM4J problem, but rather something I need to >configure at a lower level. Any help will be greatly appreciated. > >Regards, >Jeff > > > >------------------------------------------------------- >This SF.NET email is sponsored by: AMD - Your access to the experts >on Hammer Technology! Open Source & Linux Developers, register now >for the AMD Developer Symposium. Code: EX8664 >http://www.developwithamd.com/developerlab >_______________________________________________ >dom4j-user mailing list >[EMAIL PROTECTED] >https://lists.sourceforge.net/lists/listinfo/dom4j-user > > > > -- Brian W. Young Senior Software Engineer/Project Manager 1309 Sutton Park Drive South, Suite 320 Jacksonville, FL 32224 [EMAIL PROTECTED] voice: 904.482.4209 fax: 904.482.4220 ------------------------------------------------------- This SF.NET email is sponsored by: AMD - Your access to the experts on Hammer Technology! Open Source & Linux Developers, register now for the AMD Developer Symposium. Code: EX8664 http://www.developwithamd.com/developerlab _______________________________________________ dom4j-user mailing list [EMAIL PROTECTED] https://lists.sourceforge.net/lists/listinfo/dom4j-user