You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Juan Chu Chow <jc...@safe.com> on 2000/09/18 19:36:20 UTC

Error, SAX progressive parsing on comments

Hi,

I've been unable to access the archive for searching any related info about
the problem I'm encountering.

The problem occurs if there are any comments in the xml file while using the
SAX API with the progressive parsing mechanism to parse it.  If the
progressive parsing is not used then the comments in the xml do not generate
the error.  When the comments are remove, then the
progressive parsing mechanism parses okay as well.

The extracted error message from the exception that occurs is:
line:14 column:4 message:Expected comment or processing instruction

The xml files that i'm parsing look something like this:
_____________________________________________________
<?xml version="1.0" encoding="UTF-8"?>
<FeatureCollection typeName="CityModel">
   <boundedBy>
      <Box srsName="EPSG:4326">
         <coordinates>
         0.0,0.0 100.0,100.0
         </coordinates>
      </Box>
   </boundedBy>
   <property typeName="modelDate">
      Feb 2000.
   </property>
   <!-- -->
   <featureMember typeName="modelMember">
      <Feature typeName="River">
         <description>
            The river that runs through Cambridge.
         </description>
         <name>
            Cam
         </name>
         <geometricProperty typeName="centerLineOf">
            <LineString srsName="EPSG:4326">
               <coordinates>
                  0.0,50.0 100.0,50.0
               </coordinates>
            </LineString>
         </geometricProperty>
      </Feature>
   </featureMember>

</FeatureCollection>
_____________________________________________________

Any help on this will be greatly appreciated.

Thank you,

Juan


RE: Error, SAX progressive parsing on comments

Posted by Juan Chu Chow <jc...@safe.com>.
Thanks for the reply, I'm using Xerces-C Version 1.1.0.  Just wanted to know
if I was doing something terribly wrong.  I'll upgrade then.

-----Original Message-----
From: Radovan Chytracek [mailto:Radovan.Chytracek@cern.ch]
Sent: Tuesday, September 19, 2000 1:37 AM
To: xerces-c-dev@xml.apache.org
Subject: RE: Error, SAX progressive parsing on comments


Hi,

       you don't specify the Xerces-C version you use. I had the same
sort of problems with version prerelease 1.2.0. I've got the latest
CVS snapshot (1.3.0) and it's OK now. In addition the problem with
startDocument() and endDocument() SAX callbacks in progressive parsing mode
is
fixed as well. I encourage to upgrade.

Radovan


--
Radovan Chytracek                     LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
phone:  +41 22 76 72486

> ----- Original Message -----
> From: "Juan Chu Chow" <jc...@safe.com>
> To: "xerces mailing list" <xe...@xml.apache.org>
> Sent: Monday, September 18, 2000 10:36 AM
> Subject: Error, SAX progressive parsing on comments
>
>
> > Hi,
> >
> > I've been unable to access the archive for searching any related info
> about
> > the problem I'm encountering.
> >
> > The problem occurs if there are any comments in the xml file while using
> the
> > SAX API with the progressive parsing mechanism to parse it.  If the
> > progressive parsing is not used then the comments in the xml do not
> generate
> > the error.  When the comments are remove, then the
> > progressive parsing mechanism parses okay as well.
> >
> > The extracted error message from the exception that occurs is:
> > line:14 column:4 message:Expected comment or processing instruction
> >
> > The xml files that I'm parsing look something like this:
> > _____________________________________________________
> > <?xml version="1.0" encoding="UTF-8"?>
> > <FeatureCollection typeName="CityModel">
> >    <boundedBy>
> >       <Box srsName="EPSG:4326">
> >          <coordinates>
> >          0.0,0.0 100.0,100.0
> >          </coordinates>
> >       </Box>
> >    </boundedBy>
> >    <property typeName="modelDate">
> >       Feb 2000.
> >    </property>
> >    <!-- -->
> >    <featureMember typeName="modelMember">
> >       <Feature typeName="River">
> >          <description>
> >             The river that runs through Cambridge.
> >          </description>
> >          <name>
> >             Cam
> >          </name>
> >          <geometricProperty typeName="centerLineOf">
> >             <LineString srsName="EPSG:4326">
> >                <coordinates>
> >                   0.0,50.0 100.0,50.0
> >                </coordinates>
> >             </LineString>
> >          </geometricProperty>
> >       </Feature>
> >    </featureMember>
> >
> > </FeatureCollection>
> > _____________________________________________________
> >
> > Any help on this will be greatly appreciated.
> >
> > Thank you,
> >
> > Juan
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


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



RE: Error, SAX progressive parsing on comments

Posted by Radovan Chytracek <Ra...@cern.ch>.
Hi,

       you don't specify the Xerces-C version you use. I had the same
sort of problems with version prerelease 1.2.0. I've got the latest
CVS snapshot (1.3.0) and it's OK now. In addition the problem with
startDocument() and endDocument() SAX callbacks in progressive parsing mode is
fixed as well. I encourage to upgrade.

Radovan


--
Radovan Chytracek                     LHCb experiment at CERN
e-mail: Radovan.Chytracek@cern.ch     WWW: http://home.cern.ch/~chytrace
phone:  +41 22 76 72486

> ----- Original Message -----
> From: "Juan Chu Chow" <jc...@safe.com>
> To: "xerces mailing list" <xe...@xml.apache.org>
> Sent: Monday, September 18, 2000 10:36 AM
> Subject: Error, SAX progressive parsing on comments
>
>
> > Hi,
> >
> > I've been unable to access the archive for searching any related info
> about
> > the problem I'm encountering.
> >
> > The problem occurs if there are any comments in the xml file while using
> the
> > SAX API with the progressive parsing mechanism to parse it.  If the
> > progressive parsing is not used then the comments in the xml do not
> generate
> > the error.  When the comments are remove, then the
> > progressive parsing mechanism parses okay as well.
> >
> > The extracted error message from the exception that occurs is:
> > line:14 column:4 message:Expected comment or processing instruction
> >
> > The xml files that I'm parsing look something like this:
> > _____________________________________________________
> > <?xml version="1.0" encoding="UTF-8"?>
> > <FeatureCollection typeName="CityModel">
> >    <boundedBy>
> >       <Box srsName="EPSG:4326">
> >          <coordinates>
> >          0.0,0.0 100.0,100.0
> >          </coordinates>
> >       </Box>
> >    </boundedBy>
> >    <property typeName="modelDate">
> >       Feb 2000.
> >    </property>
> >    <!-- -->
> >    <featureMember typeName="modelMember">
> >       <Feature typeName="River">
> >          <description>
> >             The river that runs through Cambridge.
> >          </description>
> >          <name>
> >             Cam
> >          </name>
> >          <geometricProperty typeName="centerLineOf">
> >             <LineString srsName="EPSG:4326">
> >                <coordinates>
> >                   0.0,50.0 100.0,50.0
> >                </coordinates>
> >             </LineString>
> >          </geometricProperty>
> >       </Feature>
> >    </featureMember>
> >
> > </FeatureCollection>
> > _____________________________________________________
> >
> > Any help on this will be greatly appreciated.
> >
> > Thank you,
> >
> > Juan
> >
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> > For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
> >
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>
>


Re: Error, SAX progressive parsing on comments

Posted by Dean Roddey <dr...@charmedquark.com>.
This has been discussed on the Alphaworks forum, I think, and I suggested
that he post here. I don't have an answer for this. Lots of people use the
progressive parse stuff, and I'd be suprised if something as simple as
comments don't work. However, he seems to have a repeatable error on his
end. I haven't tried his example myself, since I've been insanely busy, but
it doesn't seem obviously wrong or anything.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"It takes two buttocks to make friction"
    - African Proverb


----- Original Message -----
From: "Juan Chu Chow" <jc...@safe.com>
To: "xerces mailing list" <xe...@xml.apache.org>
Sent: Monday, September 18, 2000 10:36 AM
Subject: Error, SAX progressive parsing on comments


> Hi,
>
> I've been unable to access the archive for searching any related info
about
> the problem I'm encountering.
>
> The problem occurs if there are any comments in the xml file while using
the
> SAX API with the progressive parsing mechanism to parse it.  If the
> progressive parsing is not used then the comments in the xml do not
generate
> the error.  When the comments are remove, then the
> progressive parsing mechanism parses okay as well.
>
> The extracted error message from the exception that occurs is:
> line:14 column:4 message:Expected comment or processing instruction
>
> The xml files that i'm parsing look something like this:
> _____________________________________________________
> <?xml version="1.0" encoding="UTF-8"?>
> <FeatureCollection typeName="CityModel">
>    <boundedBy>
>       <Box srsName="EPSG:4326">
>          <coordinates>
>          0.0,0.0 100.0,100.0
>          </coordinates>
>       </Box>
>    </boundedBy>
>    <property typeName="modelDate">
>       Feb 2000.
>    </property>
>    <!-- -->
>    <featureMember typeName="modelMember">
>       <Feature typeName="River">
>          <description>
>             The river that runs through Cambridge.
>          </description>
>          <name>
>             Cam
>          </name>
>          <geometricProperty typeName="centerLineOf">
>             <LineString srsName="EPSG:4326">
>                <coordinates>
>                   0.0,50.0 100.0,50.0
>                </coordinates>
>             </LineString>
>          </geometricProperty>
>       </Feature>
>    </featureMember>
>
> </FeatureCollection>
> _____________________________________________________
>
> Any help on this will be greatly appreciated.
>
> Thank you,
>
> Juan
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>