|
Have
you considered using a different type of parser? SAX can be used to remember
tree structures but that's really a programmers job to put it in. Its main
purpose seems to be better for "blind" read once parsing. You should look into
something like the DOM parser. It is more interactive and holds the entire tree
structure for you so that you can find any individual subtrees that you
need.
-Tim
i'm using the Apache SAX parser and i need to get
the XML tree underneath a specific node.
for example in the following xml
file...
<fields>
<field1>value
1</field1>
<field2><style
value="red"/><values>value
2</values></field2>
</fields>
i want to be able to get the trigger on the
element field2 and somehow get back the string
<style
value="red"/><value1>value1</value1><value2>value
2</value2></values>
if i use a regular sax processor to get all the
characters i end up getting only the text which in this case would be "value 1
value 2"
any way around this?
thanks
|
|