XML parsing without startelement



Hi,

I'm looking at the examples on http://java.sun.com/xml/jaxp/dist/1.1/docs/tutorial/sax/2a_echo.html

I want to parse an XML file that has just events, like this:
==>start of file
<event type="1"/>
<event type="2"/>
<method type="warning"/>
<===end of file

so there are no <start> and </start> -tags.
Using the examples on that java site I get the following fatal error:

org.xml.sax.SAXParseException: Illegal character at end of document, &#x3c;.
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.fatal(Unknown Source)
at org.apache.crimson.parser.Parser2.parseInternal(Unknown Source)
at org.apache.crimson.parser.Parser2.parse(Unknown Source)
at org.apache.crimson.parser.XMLReaderImpl.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)
at javax.xml.parsers.SAXParser.parse(Unknown Source)



It should be possible, right?


.



Relevant Pages

  • Strange performance behavior of IXMLDOMNode>>text in DPRO 5.1.4
    ... I have come a quite a way in building my own framework to parse a particular XML file (that contains information about audio tracks). ... After some more experimentation I also found that the bigger the XML file was, the longer each method execution took, even if it was for the same node at the same position. ...
    (comp.lang.smalltalk.dolphin)
  • RE: Bug in MSXML / XML Parser .Net
    ... > I have a problem parsing XML file using XSLT stylesheet by using: ... > System.Xml.XPath.MethodOperand.SetXsltContext(XsltContext context) ... > When I use XMLSpy to parse the XML using MSXML 4 processor it works perfect. ...
    (microsoft.public.dotnet.xml)
  • Re: How to get data from txt file into table of word template thro
    ... XLST file to transform the XML file into the output you need? ... I have a word document which has a lot of tables ... There's no way to answer the question about whether VBA is the best ... For the XML data source file, you said Word can parse it by itself. ...
    (microsoft.public.word.vba.general)
  • map and BYTE[]
    ... I need to parse a XML file that describes a smart card file structure ... CDataIndex(int nSFID, int nRecNo, int nOffset, int size) { ...
    (comp.lang.cpp)
  • xml to sql thru an object
    ... i need to parse an xml file and insert the values into mssql, ... Prev by Date: ...
    (microsoft.public.dotnet.languages.csharp)