abisheks at india.hp.com
Sun Dec 19 07:39:13 GMT 1999
Can someone explain that why does SAX have two call back functions one for Tag Name (startElement ) and one for the tag Value ( Characters ) Instead, why not have one function that calls back the processing application with a name value pair. ( for elements as well as attributes )
This makes it easier to process the data as u get the name of the tag and it's value in one shot.
Currently , when my application encounters a tagname it would be interested in, it sets a global Boolean flag to true so that when the call back happens on the Characters function the value is stored in a variable and not ignored.
The parser could throw a name value pair for both the elements as well as the attributes , since my application just needs the data and it would not be concerned whether the name value pair is from an element or an attribute.
Can I modify the source code of any parser that would give me name value pairs in one call back function rather than two ? How complicated would that be ?
_/ Abhishek Srivastava
_/ Hewlett Packard ISO
_/_/_/ _/_/_/ -------------------
_/ / _/ _/ (Work) +91-80-2251554 x1190
_/ _/ _/_/_/ (Ip) 184.108.40.206
_/ (Url) http://sites.netscape.net/abhishes/index.html
Work like you don't need the money.
Dance like no one is watching.
And love like you've never been hurt.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Xml-dev