mosland326
New Member
Hi Everyone--
I have (what I hope is) a pretty simple question:
(I'm running OE 10.1A)
I have an XML "RESPONSE" file being posted to me from a third party software (ConnectShip Progistics). I've started coding for a temp table in a ProDataSet and I want to use the READ-XML method to get the data from the XML Progistics is sending me. The problem I think I'm facing is that Progistics uses the Element names "CURRENCYCODE", "MONETARYVALUE", "ERRORCODE" and "ERRORDESCRIPTION" as children of multiple Elements. (I've pasted in a small portion of the DTD to show what they did.)
<!ELEMENT TOTALCHARGES (CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT TRANSPORTATIONCHARGES (CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT SERVICEOPTIONSCHARGES (CURRENCYCODE, MONETARYVALUE, SERVICEOPTION*)>
<!ELEMENT SERVICEOPTION (SERVICEOPTIONSYMBOL, CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT DISCOUNT (CURRENCYCODE, MONETARYVALUE)>
I know that in my temp table, I have to have the fields defined with the same name as the nodes so that the fields get populated correctly when the READ-XML method is done, however, (to my knowledge) I can't really define multiple fields name "CURRENCYCODE" for one table. Is there a way to code around this naming issue or do I need to go back to using the sax writer so that I can check which parent node I'm in when assigning these fields? I really hope I don't have to do that--from what I understand, I think I can cut down on a ton of code by using the READ-XML vs. the sax writer.
Hopefully I've explained all of this well enough--it makes sense in my head. :blush:
And a HUGE thanks in advance for any help anyone can give me.
P.S. I'm new to these READ and WRITE-XML methods. If you have any quick thoughts or insights you've learned that would help, I'd greatly appreciate it!!!
I have (what I hope is) a pretty simple question:
(I'm running OE 10.1A)
I have an XML "RESPONSE" file being posted to me from a third party software (ConnectShip Progistics). I've started coding for a temp table in a ProDataSet and I want to use the READ-XML method to get the data from the XML Progistics is sending me. The problem I think I'm facing is that Progistics uses the Element names "CURRENCYCODE", "MONETARYVALUE", "ERRORCODE" and "ERRORDESCRIPTION" as children of multiple Elements. (I've pasted in a small portion of the DTD to show what they did.)
<!ELEMENT TOTALCHARGES (CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT TRANSPORTATIONCHARGES (CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT SERVICEOPTIONSCHARGES (CURRENCYCODE, MONETARYVALUE, SERVICEOPTION*)>
<!ELEMENT SERVICEOPTION (SERVICEOPTIONSYMBOL, CURRENCYCODE, MONETARYVALUE)>
<!ELEMENT DISCOUNT (CURRENCYCODE, MONETARYVALUE)>
I know that in my temp table, I have to have the fields defined with the same name as the nodes so that the fields get populated correctly when the READ-XML method is done, however, (to my knowledge) I can't really define multiple fields name "CURRENCYCODE" for one table. Is there a way to code around this naming issue or do I need to go back to using the sax writer so that I can check which parent node I'm in when assigning these fields? I really hope I don't have to do that--from what I understand, I think I can cut down on a ton of code by using the READ-XML vs. the sax writer.
Hopefully I've explained all of this well enough--it makes sense in my head. :blush:
And a HUGE thanks in advance for any help anyone can give me.
P.S. I'm new to these READ and WRITE-XML methods. If you have any quick thoughts or insights you've learned that would help, I'd greatly appreciate it!!!