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/02/07 17:37:30 UTC

DO NOT REPLY [Bug 6311] New: - Serializer crashes

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

Serializer crashes 

           Summary: Serializer crashes
           Product: Xerces2-J
           Version: 2.0.0
          Platform: Other
        OS/Version: Other
            Status: NEW
          Severity: Normal
          Priority: Other
         Component: Serialization
        AssignedTo: xerces-j-dev@xml.apache.org
        ReportedBy: paul@prescod.net


import org.apache.xerces.jaxp.SAXParserFactoryImpl;
import org.apache.xml.serialize.XMLSerializer;
import java.io.*;

import org.xml.sax.XMLReader;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.SAXParseException;
import org.apache.xml.serialize.OutputFormat;


class junktest{
    static String data = "<foo><foo><bar/><star/></foo></foo>";

    public static void main(String []args) throws Exception{
            org.apache.xerces.impl.Version.main(null);

            XMLReader parser = new SAXParserFactoryImpl().newSAXParser
().getXMLReader();

            XMLSerializer filter = new XMLSerializer(
                System.out,
                new OutputFormat()
                );
            parser.setContentHandler (filter);

            Reader reader = new StringReader(data);
            InputSource source = new InputSource(reader);
            parser.parse(source);                   
    }
}

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