You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@xmlbeans.apache.org by "Xing, Charlie" <Ch...@Teradata.com> on 2008/09/08 10:57:57 UTC
How to keep line feeds with XmlOptions?
Hi:
I have string like:
String demoString = "<Demo content="first line
second line
third line"
type="user"/>";
When I'd like to parse it to xml object:
XmlObject demoObj = XmlObject.Factory.parse(demoString);
DemoDocument d = (DemoDocument)demoObj;
Then I lose line feeds when get content from the demo:
String demoContent = d.getDemo().getContent();
demoContent : ""<Demo content="first line second line
third line" type="user"/>";"
How can I keep line feeds with XmlOptions?
Thanks
Xing yun
RE: How to keep line feeds with XmlOptions?
Posted by Wing Yew Poon <wi...@oracle.com>.
What is the type of the content attribute?
________________________________
From: Xing, Charlie [mailto:Charlie.Xing@Teradata.com]
Sent: Monday, September 08, 2008 1:58 AM
To: user@xmlbeans.apache.org
Subject: How to keep line feeds with XmlOptions?
Hi:
I have string like:
String demoString = "<Demo content="first line
second line
third line"
type="user"/>";
When I'd like to parse it to xml object:
XmlObject demoObj = XmlObject.Factory.parse(demoString);
DemoDocument d = (DemoDocument)demoObj;
Then I lose line feeds when get content from the demo:
String demoContent = d.getDemo().getContent();
demoContent : ""<Demo content="first line second line third line" type="user"/>";"
How can I keep line feeds with XmlOptions?
Thanks
Xing yun