From: Steve B. <Ste...@zv...> - 2002-05-16 21:12:43
|
Tobias Gabele wrote: > i am using TclXML excessively in the ECOBAS project > (http://dino.wiz.uni-kassel.de/ecobas/new_db/download_sw.html) > and came across the following question: > > is there already a command somewhere in ::xml or ::sgml to quit parsing > based on an event. I want to stop parsing once a specific element occurs > in my elementstartcommand (to save execution time with lenghty xml files > when only one or few values have to be extracted). I could implement > this myself if its not there but maybe someone already came across the > same problem .. Your application can control the flow-of-control by returning a return code other than TCL_OK. Returning TCL_BREAK will halt the parser without throwing an exception (ie. 'return -code break'). See the documentation, or visit http://www.zveno.com/courses/samples/XML-App-Dev-Tcl/ Cheers, Steve Ball -- Steve Ball | XSLT Standard Library | Training & Seminars Zveno Pty Ltd | Web Tcl Complete | XML XSL Schemas http://www.zveno.com/ | TclXML TclDOM | Tcl, Web Development Ste...@zv... +---------------------------+--------------------- Ph. +61 2 6242 4099 | Mobile (0413) 594 462 | Fax +61 2 6242 4099 |