#42 SAX Errors on Parse with JAXP #2

closed-duplicate
nobody
5
2002-05-25
2002-04-30
Anonymous
No

SORRY!! FILE DID NOT GET ATTACHED ON INITIAL LOGGING.

Using JAXP and org.xml.sax.* packages downloaded via
Sun's XML Pack Spring EA2 edition. This provided the
Xerces and other jars for XML Parsing.

The attached file does not parse at its current size.
I am getting an error at line=104 Attribute value
should start with quote. The line looks ok. I have
found that if I delete 26 lines starting from line 75,
then, insert the closing </ope:sequence> after
</ope:struct> on line 74 the problem is fixed and it
parses. Therefore, by leaving the data originally
complained about at line 104 in tact, I believe it is
not the data.

I have also deleted lines from the error and forward
in the file. Once I got it to 5,011 bytes, it parsed
ok.

Any advice on this would be greatly appreciated.

Discussion

  • Nobody/Anonymous

    Logged In: NO

    Not sure why file won't come along so here it is in the
    comment, sorry but it is program generated using DOM and
    then toString()ed to a file. I just can't get it to parse:

    <?xml version="1.0" encoding="UTF-8"?>
    <ope xmlns:ope="http://ope/ns/ope">
    <ope:Event name="Test">
    <ope:struct name="_cwEnvelope">
    <ope:field name="eventName" value="Test" type="string"/>
    <ope:field name="pubClient" value="ope" type="string"/>
    <ope:field name="isMonitor" value="true" type="boolean"/>
    <ope:field name="transaction" value="false" type="boolean"/>
    <ope:field name="priority" value="4" type="integer"/>
    <ope:field name="deliveryMode" value="2" type="integer"/>
    <ope:field name="lifeSpan" value="1800000" type="long"/>
    <ope:field name="replyTimeout" value="30000" type="long"/>
    </ope:struct>
    <ope:field name="ucStringField" value="1" type="string"/>
    <ope:field name="dateField" value="Sunday, November 2, 1958
    12:00:00 AM EST" type="date"/>
    <ope:field name="intField" value="1" type="integer"/>
    <ope:field name="longField" value="1" type="long"/>
    <ope:field name="floatField" value="1.0" type="float"/>
    <ope:field name="doubleField" value="1.0" type="double"/>
    <ope:field name="stringField" value="1" type="string"/>
    <ope:sequence length="3" name="ucStringSeqField"
    type="string">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="dateSeqField" type="date">
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    </ope:sequence>
    <ope:sequence length="3" name="intSeqField" type="integer">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="longSeqField" type="long">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="floatSeqField" type="float">
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    </ope:sequence>
    <ope:sequence length="3" name="doubleSeqField"
    type="double">
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    </ope:sequence>
    <ope:sequence length="3" name="stringSeqField"
    type="string">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:struct name="structure">
    <ope:field name="ucStringStructField" value="1"
    type="string"/>
    <ope:field name="dateStructField" value="Sunday, November
    2, 1958 12:00:00 AM EST" type="date"/>
    <ope:field name="intStructField" value="1" type="integer"/>
    <ope:field name="longStructField" value="1" type="long"/>
    <ope:field name="floatStructField" value="1.0"
    type="float"/>
    <ope:field name="doubleStructField" value="1.0"
    type="double"/>
    <ope:field name="stringStructField" value="1"
    type="string"/>
    </ope:struct>
    <ope:sequence length="3" name="seqStructure" type="struct">
    <ope:struct name="seqStructure">
    <ope:field name="ucStringSeqStructField" value="1"
    type="string"/>
    <ope:field name="dateSeqStructField" value="Sunday,
    November 2, 1958 12:00:00 AM EST" type="date"/>
    <ope:field name="intSeqStructField" value="1"
    type="integer"/>
    <ope:field name="longSeqStructField" value="1" type="long"/>
    <ope:field name="floatSeqStructField" value="1.0"
    type="float"/>
    <ope:field name="doubleSeqStructField" value="1.0"
    type="double"/>
    <ope:field name="stringSeqStructField" value="1"
    type="string"/>
    </ope:struct>
    <ope:struct name="seqStructure">
    <ope:field name="ucStringSeqStructField" value="2"
    type="string"/>
    <ope:field name="dateSeqStructField" value="Sunday,
    November 2, 1958 12:00:00 AM EST" type="date"/>
    <ope:field name="intSeqStructField" value="2"
    type="integer"/>
    <ope:field name="longSeqStructField" value="2" type="long"/>
    <ope:field name="floatSeqStructField" value="2.0"
    type="float"/>
    <ope:field name="doubleSeqStructField" value="2.0"
    type="double"/>
    <ope:field name="stringSeqStructField" value="2"
    type="string"/>
    </ope:struct>
    <ope:struct name="seqStructure">
    <ope:field name="ucStringSeqStructField" value="3"
    type="string"/>
    <ope:field name="dateSeqStructField" value="Sunday,
    November 2, 1958 12:00:00 AM EST" type="date"/>
    <ope:field name="intSeqStructField" value="3"
    type="integer"/>
    <ope:field name="longSeqStructField" value="3" type="long"/>
    <ope:field name="floatSeqStructField" value="3.0"
    type="float"/>
    <ope:field name="doubleSeqStructField" value="3.0"
    type="double"/>
    <ope:field name="stringSeqStructField" value="3"
    type="string"/>
    </ope:struct>
    </ope:sequence>
    <ope:field name="NewField" value="1" type="string"/>
    <ope:field name="NewField2" value="Sunday, November 2, 1958
    12:00:00 AM EST" type="date"/>
    <ope:field name="NewField3" value="1" type="integer"/>
    <ope:field name="NewField4" value="1" type="long"/>
    <ope:field name="NewField5" value="1.0" type="float"/>
    <ope:field name="NewField6" value="1.0" type="double"/>
    <ope:field name="NewField7" value="1" type="string"/>
    <ope:struct name="structSeq">
    <ope:sequence length="3" name="ucStringStructSeq"
    type="string">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="dateStructSeq" type="date">
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    <ope:field value="Sunday, November 2, 1958 12:00:00 AM
    EST"/>
    </ope:sequence>
    <ope:sequence length="3" name="intStructSeq" type="integer">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="longStructSeq" type="long">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    <ope:sequence length="3" name="floatStructSeq" type="float">
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    </ope:sequence>
    <ope:sequence length="3" name="doubleStructSeq"
    type="double">
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    <ope:field value="1.0"/>
    </ope:sequence>
    <ope:sequence length="3" name="stringStructSeq"
    type="string">
    <ope:field value="1"/>
    <ope:field value="1"/>
    <ope:field value="1"/>
    </ope:sequence>
    </ope:struct>
    </ope:Event>
    </ope>

     
  • Nobody/Anonymous

    Logged In: NO

    This has been resolved and thanks.

     
  • Anonymous - 2002-05-25
    • status: open --> closed-duplicate
     
  • Anonymous - 2002-05-25

    Logged In: YES
    user_id=44117

    again, not a SAX bug but a parser bug.

     

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks