I am probably doing this in a convoluted way and I am sure someone will suggest something better. I have been working with SAX and I have 3 xml files that need to come together so I can do stuff with them. I have not figured out how to do this in one fell swoop because I am a newbie.
I tried to pass the ttProducts and the ttCategories each from there corresponding procedure to a meeting point in another file. I can get one of them to go, but since the method I am using is using defining an input parameter I am getting a mismatched # of passed parameters error. I tried calling the two separate sax procedures from one file with run statements which makes this chain of events more complex and crazy.
PLEASE help me by giving me an idea how to accomplish this or if there is something I need to look up?
Without really knowing what the xml files contain, perhaps prodatasets
can help you. A Dataset is comprised of one or more temp-tables, and
can be passed as a single parameter
I imagine that might would help if the source of the parsing was happening in the same spot. How do you code sax to parse 3 different XML files? I suppose I wouldn't need to pass temp-tables if I could do that.
The problem is the products XML is complex and the other two are pretty simple and I don't think the callback code is one size fit all.
Not sure what the best way to deal with this.
SAX Processing is really for processing a single input stream as a source of events. If you want to enrich this, then typically what you should think about is:
- load the 2 'extra' files into temp-tables or prodatasets with the data you want to use as lookups/enrichment
- process the large XML file as a stream (SAX) and when you get to nodes you want to enrich, then use the saved data.