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 bu...@apache.org on 2002/05/20 07:08:33 UTC

DO NOT REPLY [Bug 9241] New: - XML file format is not maintained

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9241>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=9241

XML file format is not maintained

           Summary: XML file format is not maintained
           Product: Xerces2-J
           Version: 2.0.0
          Platform: PC
        OS/Version: Windows 9x
            Status: NEW
          Severity: Major
          Priority: Other
         Component: Serialization
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: sudhirk@momentum-tech.com


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();

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