[ 
https://issues.apache.org/jira/browse/XERCESJ-323?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17679580#comment-17679580
 ] 

Elliotte Rusty Harold commented on XERCESJ-323:
-----------------------------------------------

I'm willing to bet this one is working as intended, and should simply be 
closed. There's not enough detail here to be certain, but it's probably a case 
of someone expecting a parser to roundtrip semantically insiginficant 
differences like CDATA sections and whitespace inside tags. 

> XML file format is not maintained
> ---------------------------------
>
>                 Key: XERCESJ-323
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-323
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: Serialization
>    Affects Versions: 2.0.0
>         Environment: Operating System: Windows 9x
> Platform: PC
>            Reporter: sudhirk
>
> Dom parser is changing the format or layout of XML files .
> This makes it extremely difficult to read for validation of functionality.
> code written for serialization is like this:-
> import org.apache.xml.serialize.OutputFormat;
> import org.apache.xml.serialize.XMLSerializer;
> // creating the file output stream of the xml to make the updation
> FileOutputStream fos = new FileOutputStream(fileName);
> // get the dom object for each key value
> Document domObject = (Document) DOMList.get(fileName);
> // creating the output format object, so that xml file is indent properly
> OutputFormat opf = new OutputFormat(domObject);
> opf.setLineSeparator("\n\r");
> opf.setIndenting(true);
> opf.setIndent(GlobalConstants.EDITOR_INDENT);
> //serializing the data in xml file
> XMLSerializer out = new XMLSerializer(fos, opf);
> out.serialize(domObject);
> fos.close();



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: j-dev-unsubscr...@xerces.apache.org
For additional commands, e-mail: j-dev-h...@xerces.apache.org

Reply via email to