Vijay Kumar,
Do u ever parse it with Xerces 2, seem that it has problem!!!!
Can you help, please?
Choo Jun Tan
Tel: (604) 890-8143 Ext: 155
Direct Line: (604) 8934155
Fax: (604) 890-1771
E-Mail: [EMAIL PROTECTED]
Visit us at www.ebx.com
"Vijaya Kumar"
<[EMAIL PROTECTED] To: <[EMAIL PROTECTED]>
INDIA.com> cc:
Subject: RE: Converting DOM
to XML
2002-03-15 08:11 PM
Please respond to
xerces-j-user
Hi Reshma.
do u mean to say, converting Document to string, which is in XML format
then here is the answer, using Xercers1.4 API from apache
public static String getDocumentAsString(Document doc) throws Exception
{
OutputFormat format = new OutputFormat("XML","UTF-8",true);
ByteArrayOutputStream str = new ByteArrayOutputStream();
XMLSerializer serializer = new XMLSerializer(str, format);
serializer.serialize(doc.getDocumentElement());
return str.toString();
}
i hope this will help u
Vijay Kumar
-----Original Message-----
From: Gude Reshma [mailto:[EMAIL PROTECTED]
Sent: Friday, March 15, 2002 5:40 PM
To: [EMAIL PROTECTED]
Subject: Converting DOM to XML
hi,
after parsing a document i get the document object. I do some
modifications to it. Now i want to convert the document back to XML. How
can i do this?
the com.ibm.xml.parsers.TxDocument provides a print method that converts
a document object to String . However i wasnt able to get the package.
Is it deprecated?
thanx.
_____
Do You Yahoo!?
Yahoo! Sports - live college hoops coverage
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]