Hi Michael
Thanx for the help.
However, i'm still not able to get the desired output. How can we set
version and indention?
right now i'm able to generate the xml file but it is coming without any
format. 
and still the memory utilization is 21%. 
to get it written at a a particular file i'm using 
String source = writer.writeToString(xmlDoc); // this function is taking 21%
of runtime memory
and then i count string in byte array and get it written to a specific
location.

Any suggestions.. how can i do in a better way?

Thank You
Regards
Richa



Michael Glavassevich wrote:
> 
> Hi Richa,
> 
> "org.w3c.dom.DOMImplementationRegistry" is a typo in the docs. It should 
> contain an import for "org.w3c.dom.bootstrap.DOMImplementationRegistry" 
> which is the correct name of the class.
> 
> Thanks.
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: [EMAIL PROTECTED]
> E-mail: [EMAIL PROTECTED]
> 
> richa <[EMAIL PROTECTED]> wrote on 07/30/2007 02:48:20 AM:
> 
>> 
>> Thanx Michael
>> i tried to use the link you have given. 
>>  i changed my code and i was getting null pointer exception at
>> DOMImplementationRegistry.newInstance();
>> I realised this was because i was not using the correct import. But when 
> i
>> tried to import "import org.w3c.dom.DOMImplementationRegistry;"  it 
> wasn't
>> recognizable. 
>>  i also downloaded Xerces-J-bin.2.9.0.tar.gz  , to get the latest 
> XercesImpl
>> jar.. but i didnt find the above import. Could you please help in this.
>> 
>> Thank you
>> Richa
>> 
>> Michael Glavassevich wrote:
>> > 
>> > Richa,
>> > 
>> > If you're talking about org.apache.xml.serialize.XMLSerializer [1] the 
> 
>> > entire API was deprecated in Xerces 2.9.0. DOM Level 3's LSSerializer 
> and 
>> > the JAXP Transformer API offer similar functionality [2].
>> > 
>> > Thanks.
>> > 
>> > [1] 
>> > http://xerces.apache.org/xerces2-
>> j/javadocs/other/org/apache/xml/serialize/XMLSerializer.html
>> > [2] http://xerces.apache.org/xerces2-j/faq-general.html#faq-6
>> > 
>> > Michael Glavassevich
>> > XML Parser Development
>> > IBM Toronto Lab
>> > E-mail: [EMAIL PROTECTED]
>> > E-mail: [EMAIL PROTECTED]
>> > 
>> > richa <[EMAIL PROTECTED]> wrote on 07/27/2007 04:04:06 AM:
>> > 
>> >> 
>> >> what could be the possible alternative for the serialise(document 
> doc)
>> >> function.
>> >> its quite memory intensive..
>> >> uses almost 25% -30% of the runtime memory.
>> >> 
>> >> Thanx
>> >> Richa
>> >> -- 
>> >> View this message in context: http://www.nabble.com/optimise-
>> >> XmlSerialise.serialise%28Document-doc%29-tf4156014.html#a11824678
>> >> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>> >> 
>> >> 
>> >> ---------------------------------------------------------------------
>> >> 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]
>> > 
>> > 
>> > 
>> 
>> -- 
>> View this message in context: http://www.nabble.com/optimise-
>> XmlSerialise.serialise%28Document-doc%29-tf4156014.html#a11858839
>> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
>> 
>> 
>> ---------------------------------------------------------------------
>> 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]
> 
> 
> 

-- 
View this message in context: 
http://www.nabble.com/optimise-XmlSerialise.serialise%28Document-doc%29-tf4156014.html#a11863826
Sent from the Xerces - J - Users mailing list archive at Nabble.com.


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to