Hi All,
I am using a dom parser to write a xml file .I get first line in the xml
file as
<?xml version="1.0" encoding="UTF-8" ?>

Below the version i want a few lines added as.....

<packageBody xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";

xmlns="http://www.vignette.com/xmlschemas/importexport";

xsi:schemaLocation="http://www.vignette.com/xmlschemas/importexport
7201/packageBody.xsd<http://www.vignette.com/xmlschemas/importexport%207201/packageBody.xsd>
">





I am using following code snippet to do this



OutputFormat format = *new* OutputFormat(dom);

                  format.setIndenting(*true*);



                  //to generate output to console use this serializer



                  XMLSerializer serializer = *new* XMLSerializer(

                              *new* FileOutputStream(*new* File(
"D:\\packageBody.xml")), format);



                  serializer.serialize(dom);

Please help…..
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
dom4j-user mailing list
dom4j-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dom4j-user

Reply via email to