View previous topic :: View next topic |
Author |
Message |
chrisw Beginner
Joined: 09 Apr 2008 Posts: 1 Topics: 1
|
Posted: Thu Jul 10, 2008 1:54 pm Post subject: COBOL XML PARSER question |
|
|
Hi,
I'm using the COBOL XML PARSER (XML-PARSE stmt) for the first time and attempting to parse a document that has the same element tag <RqUID> in multiple places throughout the XML doc. For example...
<BankSvcRq>
<RqUID>123-456-789</RqUID>
<AcctInqRq>
<RqUID>454-123-987</RqUID>
</AcctInqRq>
</BankSvcRq>
Is there some mechanism/feature of the XML PARSER that will allow me to differentiate between the two occurences of RqUID or will I have to manage this situation using COBOL logic?
Any help would be appreciated!
Thanks, Chris. |
|
Back to top |
|
|
ash_sudp Beginner
Joined: 17 May 2006 Posts: 12 Topics: 0
|
Posted: Tue Jun 09, 2009 3:30 pm Post subject: |
|
|
Cobol entreprise parser does not have the functionality. But you can build a wrapper arount the built in parser to identify any tag that occurs multiple times. |
|
Back to top |
|
|
Terry_Heinze Supermod
Joined: 31 May 2004 Posts: 391 Topics: 4 Location: Richfield, MN, USA
|
Posted: Tue Jun 09, 2009 10:21 pm Post subject: |
|
|
When you define the copy book to populate those fields, just make them unique, like: BSR-RqUID and AIR-RqUID for instance. When I encountered this situation, I prefixed the RqUID with the level number of the field, like 15-RqUID and 20-RqUID. Whatever you need to do to make them unique. _________________ ....Terry |
|
Back to top |
|
|
|
|