You are viewing a plain text version of this content. The canonical link for it is here.
Posted to j-dev@xerces.apache.org by "Elliotte Rusty Harold (Jira)" <xe...@xml.apache.org> on 2025/06/22 21:01:00 UTC
[jira] [Resolved] (XERCESJ-323) XML file format is not maintained
[ https://issues.apache.org/jira/browse/XERCESJ-323?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Elliotte Rusty Harold resolved XERCESJ-323.
-------------------------------------------
Resolution: Invalid
can reopen if there's a test case ith proof of actual error (i.e. not just white space in tags, CDATA section, or other syntax sugar like that)
> 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-unsubscribe@xerces.apache.org
For additional commands, e-mail: j-dev-help@xerces.apache.org