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
Re: [Tclxml-users] API change?
by David N. Welton other posts by this author
Dec 14 2004 11:33AM messages near this date
[Tclxml-users] WSDL Generation for TclSOAP | Re: [Tclxml-users] API change?
Steve Ball <Steve.Ball@[...].com>  writes:

>  First I've heard of this... TclXML v3.0 is a major version change,
>  but the API has not changed *that* much.

>  TclXML v3.X passes all of its regression tests. including the
>  parsing API and parsing empty element syntax.  I will investigate
>  further, back a small sample XML source document and Tcl script
>  would be helpful.

Here's a script that Massimo, the guy who noticed this, sent me.

-- 
David N. Welton
Personal:                   http://www.dedasys.com/davidw/
Apache Tcl:                 http://tcl.apache.org/
Free Software:              http://www.dedasys.com/freesoftware/
Linux Incompatibility List: http://www.leenooks.com/

----
package require xml

proc elemStartCmd {elem_type attr_list args} {
    puts [list > >>>>>>>>> open $elem_type ($attr_list $args)]
}

proc elemEndCmd {elem_type args} {
    puts [list > >>>>>>>>> close $elem_type ($args)]
}

proc descriptiveData {cdata} {
    puts [list cdata: $cdata]
}

set theParser [::xml::parser				    \
		    -elementendcommand	    elemEndCmd	    \
		    -elementstartcommand    elemStartCmd    \
		    -characterdatacommand   descriptiveData ]

set	xmldata ""
append	xmldata "<toplevel>  Document root\n"
append  xmldata "   <livello1>  Tag for generic element </livello1>\n"
append	xmldata	"   <livello1 attr1_1=\"v1\" attr1_2=\"v2\">  Nuovo Elemento contenente altri 
Elementi\n"
append	xmldata	"        <livello2 attr2_1=\"v1\" attr2_2=\"v2\"/> \n"
append	xmldata	"        <livello2 attr2_1=\"v3\" attr2_2=\"v4\"/> \n"
append  xmldata	"        <livello2>  Tag chiuso in modo \"canonico\" </livello2>\n"
append	xmldata "   </livello1> \n"
append	xmldata "</toplevel> \n"

$theParser parse $xmldata






-------------------------------------------------------
SF email is sponsored by - The IT Product Guide
Read honest & candid reviews on hundreds of IT Products from real users.
Discover which products truly live up to the hype. Start reading now. 
http://productguide.itmanagersjournal.com/
_______________________________________________
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