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=21404>.
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=21404

Serialization of tags with long text inserts line break and indentation!

           Summary: Serialization of tags with long text inserts line break
                    and indentation!
           Product: Xerces2-J
           Version: 2.4.0
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]


Elements that have long text as the text node content are serialized with a 
line break and additional indentation:

------------ line break after "NOTES": -------------------
<AssetDesc>KFW INTERNATIONAL FINANCE INC. DL-MEDIUM-TERM NOTES
    1999(04) (2004-03-10)</AssetDesc>
------------

instead of

------------ one single line: ------------------------
<AssetDesc>KFW INTERNATIONAL FINANCE INC. DL-MEDIUM-TERM NOTES 1999(04) (2004-
03-10)</AssetDesc>
------------

I checked it with several text contents, also typed new text to avoid "hidden" 
strange white spaces. I guess that more than 70 characters lead to the 
linebreak.

The code to serialize the document is:
-----------------------
            FileWriter fw = new FileWriter(file);
            OutputFormat of = new OutputFormat(document, "iso-8859-1", true);
            XMLSerializer xmls = new XMLSerializer(fw, of);
            xmls.serialize(document);
---------------------

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to