ASPN ActiveState Programmer Network
ActiveState
/ Home / Perl / PHP / Python / Tcl / XSLT /
/ Safari / My ASPN /
Cookbooks | Documentation | Mailing Lists | Modules | News Feeds | Products | User Groups


Recent Messages
List Archives
About the List
List Leaders
Subscription Options

View Subscriptions
Help

View by Topic
ActiveState
.NET Framework
Open Source
Perl
PHP
Python
Tcl
Web Services
XML & XSLT

View by Category
Database
General
SOAP
System Administration
Tools
User Interfaces
Web Programming
XML Programming


MyASPN >> Mail Archive >> tclxml-users
tclxml-users
[Tclxml-users] Incremental parsing
by Ian Braithwaite other posts by this author
Sep 20 2005 2:15PM messages near this date
Re: [Tclxml-users] [ANN]: VTD-XML 1.0 released | [Tclxml-users] using xsd to validate xml in tcl applications
Hi,


I'm trying to get the hang of [xml::parser -final 0] for
incremental parsing, with little luck :-(.

Has anyone used this with the pure Tcl parser (3.0)? I'm getting
parse errors with incremental, but no errors without.


Incremental:
====
package require xml

set parser [xml::parser -final 0 -errorcommand xerror]

proc xerror args {
    puts "xerror: $args"
}

$parser parse {<one x="5"> hello world</one>}
$parser configure -final 1
$parser parse \n
====

gives:
xerror: unexpectedtext {unexpected text " x="5"" in document prolog around line 0}


while setting "-final 1" instead and
====
$parser parse {<one x="5"> hello world</one>
}
====

works as expected.


Thanks,
Ian Braithwaite



-------------------------------------------------------
SF.Net email is sponsored by:
Tame your development challenges with Apache's Geronimo App Server. 
Download it for free - -and be entered to win a 42" plasma tv or your very
own Sony(tm)PSP.  Click here to play: http://sourceforge.net/geronimo.php
_______________________________________________
Tclxml-users mailing list
Tclxml-users@[...].net
https://lists.sourceforge.net/lists/listinfo/tclxml-users

Privacy Policy | Email Opt-out | Feedback | Syndication
© ActiveState Software Inc. All rights reserved