I'm writing some code to parse XML files. I'm OK with coding tags that have no attributes in them:
<productQuantity>0</productQuantity>
parses OK, and I even get the right output!
But how do I get the output for a tag that has attribs in it? Following is a short sample of my XML file:
<item orderType="xxx" invenType="yyy">
<productQuantity>0</productQuantity>
</item>
The "xxx" and "yyy" means that these may be any of several inputs; they are not always the same so I can't hard code each possible combination of inputs.
I need to be able to show the orderType and invenType in my output.
I'm using SAX, not DOM, to parse.
Thanks!