Originally posted by Elango SV:
XML document was formed perfectly. But recently when I tried running the application again, I found that the xml is not created properly.
Well, what has changed? (if anything).
I believe you are seeing '<' not '&1t;' (a lowercase L rather than a �one� ; i.e. the less-than entity).
Because of the special meaning of <, > , and & in XML, these characters cannot be used in the content portion of an XML element. So whenever <, >, & are used in text they need to be replaced by < , > and & respectively.
You may have to encode the strings before your put them into your object representation of the XML document. Fortunately BEA has already provided that functionality in a library method -
XMLUtils.encodeXML(String,boolean). That also means that you will have to run XMLUtils.decodeXML(
String) on any text coming from the object representation or the XML document.
Alternately one of your development, editing or printing tools may have inadvertently changed the '<' to a '<'.
[ March 14, 2006: Message edited by: Peer Reynders ]