Hi,

I couldn't get the CDATA Bookmark to work with the code snippet illustrated
below. Any idea what I'm doing wrong?

Thank you in advance for your help?

NodeRoot root;
Document doc = Document.Factory.newInstance(); 
Document.NodeRoot xmlRoot = Document.NodeRoot.Factory.newInstance()
Node1Type n1 = xmlRoot.addNewNode1();
Node2Type n2 = n1.addNewNode2();
n2.setDescription("Cdata help needed"); 
XmlCursor cursor = n2.xgetDescription().newCursor(); 
cursor.toFirstContentToken(); 
cursor.setBookmark(CDataBookmark.CDATA_BOOKMARK);
cursor.dispose();
XmlOptions opt = new XmlOptions();
opt.setUseCDataBookmarks();
FileOutputStream xmlFile = new FileOutputStream(filePath); 
doc.save(xmlFile, opt); 
xmlFile.close();


-- 
View this message in context: 
http://www.nabble.com/CDATA-Bookmark-problem%2C-xmlbeans-version-2.4-tp21448916p21448916.html
Sent from the Xml Beans - User mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscr...@xmlbeans.apache.org
For additional commands, e-mail: user-h...@xmlbeans.apache.org

Reply via email to