You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-users@xerces.apache.org by richa <ri...@techblue.co.uk> on 2007/07/27 10:04:06 UTC

optimise XmlSerialise.serialise(Document doc)

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: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Prashant Reddy <pr...@pramati.com>.
To use the endorsed.dirs overrides mechanism, you will need to modify
your java command that launches the program to include a system property
called "java.endorsed.dirs". 

The value of this system property should be the directory where you have
the xerces downloaded to, more precisely the directory where the jars
xercesImpl, xml-apis and resolver are present.

For example : 
~/Desktop/xerces-2_8_0
$ ls *.jar
resolver.jar  xercesImpl.jar  xercesSamples.jar  xml-apis.jar

Now my java cmd is like this :
java -Djava.endorsed.dirs=/home/prashant/Desktop/xerces-2_8_0
domls.TestPrettyPrint

Hope this helps.
-Prashant
On Tue, 2007-07-31 at 06:15 -0700, richa wrote:
> Hi Prashant,
> Thanx for the reply. but i think i'm quite novice to understand that. I'm
> using jdk1.5 and i created one folder in lib folder with the name endorsed
> and placed xercesImpl and xerces-api jars there. Still the same error is
> coming. 
> i think i'm probably not doing the correct thing.
> Can you please guide me how to achieve it.
> Thank you
> Regards
> Richa



---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Stanimir Stamenkov <st...@myrealbox.com>.
Wed, 8 Aug 2007 02:21:35 -0700 (PDT), /richa/:

> ... the method i'm using to write the file is not able to read 
> the special characters like !/-.

What do you mean with "the method i'm using to write the file is not 
able to read"?

> How can i resolve such issue, because this 
> is abst necessary for me. These values are not the tag names but part of the 
> tag value.

By tag value I presume you mean character data, either part of 
element content or attribute value.  The characters you mention are 
not special markup characters so they don't need special 
encoding/escaping.  I'm not clear what you try to describe.

By the way, it is better to start a new thread for other issues 
(different from this topic) you may have.

-- 
Stanimir

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by richa <ri...@techblue.co.uk>.
HI Michael,

Thanx a lot for your help. It really made my day when the code was actually
deployed. But, on live server i realized there is one more problem. The
problem is that the method i'm using to write the file is not able to read
the special characters like !/-. How can i resolve such issue, because this
is abst necessary for me. These values are not the tag names but part of the
tag value.
Any suggestions for this.

Thanx once again
Regards
Richa

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


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Richa,

The default location is <jdk-base-dir>/jre/lib/endorsed. If you're placing 
the jars in some other directory you need to specify where they are by 
setting the java.endorsed.dirs system property.

Thanks.

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

richa <ri...@techblue.co.uk> wrote on 07/31/2007 09:15:39 AM:

> Hi Prashant,
> Thanx for the reply. but i think i'm quite novice to understand that. 
I'm
> using jdk1.5 and i created one folder in lib folder with the name 
endorsed
> and placed xercesImpl and xerces-api jars there. Still the same error is
> coming. 
> i think i'm probably not doing the correct thing.
> Can you please guide me how to achieve it.
> Thank you
> Regards
> Richa
> 
> -- 
> View this message in context: http://www.nabble.com/optimise-
> XmlSerialise.serialise%28Document-doc%29-tf4156014.html#a11923793
> Sent from the Xerces - J - Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by richa <ri...@techblue.co.uk>.
Hi Prashant,
Thanx for the reply. but i think i'm quite novice to understand that. I'm
using jdk1.5 and i created one folder in lib folder with the name endorsed
and placed xercesImpl and xerces-api jars there. Still the same error is
coming. 
i think i'm probably not doing the correct thing.
Can you please guide me how to achieve it.
Thank you
Regards
Richa

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


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Prashant Reddy <pr...@pramati.com>.
Which version of Java are you using ? "format-pretty-print" is a DOM
Level 3 feature.

This means that if you are using JDK < version 5 (or even JDK 5, not
sure), you will need to use endored.dirs overrides mechanism to pick up
the xerces 9 implementation. Putting xerces 9 jars in classpath is not
enough.

http://java.sun.com/j2se/1.4.2/docs/guide/standards/

Hope this helps
-Prashant

On Tue, 2007-07-31 at 03:54 -0700, richa wrote:
> Hi Michael
> 
> Thanx again for the help.
> 
> However, there is one more problem . when i'm setting the value for
> "format-pretty-print" as true, i"m getting an exception
> FEATURE_NOT_SUPPORTED. the parameter format-pretty-print is recognized but
> the requested value cannot be supported. 
> The code i'm using is :
> DOMImplementationRegistry registry =
> DOMImplementationRegistry.newInstance();
> DOMImplementationLS impl =
> (DOMImplementationLS)registry.getDOMImplementation("LS");
> LSSerializer writer = impl.createLSSerializer();
> DOMConfiguration dmconfig = writer.getDomConfig();
> dmconfig.setParameter("format-pretty-print", true);
> 
> what should i do now??
> 
> Thank You
> Regards
> Richa
> 
> 
> 
> Michael Glavassevich wrote:
> > 
> > Hi Richa,
> > 
> > richa <ri...@techblue.co.uk> wrote on 07/30/2007 09:33:07 AM:
> > 
> >> Hi Michael
> >> Thanx for the help.
> >> However, i'm still not able to get the desired output. How can we set
> >> version and indention?
> > 
> > "format-pretty-print" [1] controls whether the LSSerializer adds 
> > indentation.
> > 
> >> 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?
> > 
> > Asking the serializer to produce a string which you immediately write to a 
> > file is a waste of time and memory. If you want to write the document to a 
> > file, you should write it directly to a file. See LSOutput.setByteStream() 
> > [2].
> > 
> >> Thank You
> >> Regards
> >> Richa
> > 
> > Thanks.
> > 
> > [1] 
> > http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#parameter-format-pretty-print
> > [2] 
> > http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSOutput.html#setByteStream(java.io.OutputStream)
> > 
> > Michael Glavassevich
> > XML Parser Development
> > IBM Toronto Lab
> > E-mail: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> > 
> > 
> > 
> 
-- 

-Prashant

Don't upload, just share : www.dekoh.com


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by richa <ri...@techblue.co.uk>.
Hi Michael

Thanx again for the help.

However, there is one more problem . when i'm setting the value for
"format-pretty-print" as true, i"m getting an exception
FEATURE_NOT_SUPPORTED. the parameter format-pretty-print is recognized but
the requested value cannot be supported. 
The code i'm using is :
DOMImplementationRegistry registry =
DOMImplementationRegistry.newInstance();
DOMImplementationLS impl =
(DOMImplementationLS)registry.getDOMImplementation("LS");
LSSerializer writer = impl.createLSSerializer();
DOMConfiguration dmconfig = writer.getDomConfig();
dmconfig.setParameter("format-pretty-print", true);

what should i do now??

Thank You
Regards
Richa



Michael Glavassevich wrote:
> 
> Hi Richa,
> 
> richa <ri...@techblue.co.uk> wrote on 07/30/2007 09:33:07 AM:
> 
>> Hi Michael
>> Thanx for the help.
>> However, i'm still not able to get the desired output. How can we set
>> version and indention?
> 
> "format-pretty-print" [1] controls whether the LSSerializer adds 
> indentation.
> 
>> 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?
> 
> Asking the serializer to produce a string which you immediately write to a 
> file is a waste of time and memory. If you want to write the document to a 
> file, you should write it directly to a file. See LSOutput.setByteStream() 
> [2].
> 
>> Thank You
>> Regards
>> Richa
> 
> Thanks.
> 
> [1] 
> http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#parameter-format-pretty-print
> [2] 
> http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSOutput.html#setByteStream(java.io.OutputStream)
> 
> Michael Glavassevich
> XML Parser Development
> IBM Toronto Lab
> E-mail: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 

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


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
Hi Richa,

richa <ri...@techblue.co.uk> wrote on 07/30/2007 09:33:07 AM:

> Hi Michael
> Thanx for the help.
> However, i'm still not able to get the desired output. How can we set
> version and indention?

"format-pretty-print" [1] controls whether the LSSerializer adds 
indentation.

> 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?

Asking the serializer to produce a string which you immediately write to a 
file is a waste of time and memory. If you want to write the document to a 
file, you should write it directly to a file. See LSOutput.setByteStream() 
[2].

> Thank You
> Regards
> Richa

Thanks.

[1] 
http://www.w3.org/TR/DOM-Level-3-LS/load-save.html#parameter-format-pretty-print
[2] 
http://xerces.apache.org/xerces2-j/javadocs/api/org/w3c/dom/ls/LSOutput.html#setByteStream(java.io.OutputStream)

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by richa <ri...@techblue.co.uk>.
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: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> 
> richa <ri...@techblue.co.uk> 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: mrglavas@ca.ibm.com
>> > E-mail: mrglavas@apache.org
>> > 
>> > richa <ri...@techblue.co.uk> 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: j-users-unsubscribe@xerces.apache.org
>> >> For additional commands, e-mail: j-users-help@xerces.apache.org
>> > 
>> > 
>> > ---------------------------------------------------------------------
>> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
>> > For additional commands, e-mail: j-users-help@xerces.apache.org
>> > 
>> > 
>> > 
>> 
>> -- 
>> 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: j-users-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 

-- 
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: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
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: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

richa <ri...@techblue.co.uk> 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: mrglavas@ca.ibm.com
> > E-mail: mrglavas@apache.org
> > 
> > richa <ri...@techblue.co.uk> 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: j-users-unsubscribe@xerces.apache.org
> >> For additional commands, e-mail: j-users-help@xerces.apache.org
> > 
> > 
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> > For additional commands, e-mail: j-users-help@xerces.apache.org
> > 
> > 
> > 
> 
> -- 
> 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: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by richa <ri...@techblue.co.uk>.
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: mrglavas@ca.ibm.com
> E-mail: mrglavas@apache.org
> 
> richa <ri...@techblue.co.uk> 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: j-users-unsubscribe@xerces.apache.org
>> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org
> 
> 
> 

-- 
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: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org


Re: optimise XmlSerialise.serialise(Document doc)

Posted by Michael Glavassevich <mr...@ca.ibm.com>.
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: mrglavas@ca.ibm.com
E-mail: mrglavas@apache.org

richa <ri...@techblue.co.uk> 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: j-users-unsubscribe@xerces.apache.org
> For additional commands, e-mail: j-users-help@xerces.apache.org


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-users-help@xerces.apache.org