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 Daniele <cu...@libero.it> on 2002/06/11 15:38:00 UTC

storing a token

HI there,
 
            I'm trying to keep a copy of a token in a SAX progressive
scan..but it dosen't seem to work:-(
 
Can anybody give me a help?
 
XMLPScanToken  tmpToken;
 
tmpToken = realToken; (realToken is the one filled in parseFirst)
 
            .
            . (some parseNext using realToken)
            .
realToken = tmpToken; (to restore the parse point back up the top)
 
I can't figure it out:-)
 
Thanx a lot 4 your time:-)
 
Ciao from Italy (Rome)
 
Daniele
 
cusumano@acmesolutions.it

RE: storing a token

Posted by Erik Rydgren <er...@mandarinen.se>.
I do not think the progressive parse works that way. Think about it.
To be able to revert to a prior state in the parse then the parser has to:

Set the stream back to that position. (If it is a socketstream that is not
possible.)
and
"Forget" all seen entities, elements, attributes and so on in the validator
from that point to the current. (Which ones to forget? The parser would have
to backtrack by parsing back to that position.)

I think you are asking for something impossible. Try to solve the problem in
another way.

Regards
Erik Rydgren
Mandarinen systems AB
Sweden

-----Original Message-----
From: Daniele [mailto:cusumano3@libero.it]
Sent: den 11 juni 2002 15:38
To: xerces-c-dev@xml.apache.org
Subject: storing a token


HI there,

            I'm trying to keep a copy of a token in a SAX progressive
scan..but it dosen't seem to workL

Can anybody give me a help?

XMLPScanToken  tmpToken;

tmpToken = realToken; (realToken is the one filled in parseFirst)

            .
            . (some parseNext using realToken)
            .
realToken = tmpToken; (to restore the parse point back up the top)

I can't figure it outJ

Thanx a lot 4 your timeJ

Ciao from Italy (Rome)

Daniele

cusumano@acmesolutions.it


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