Trying to parse a specific child element, but there are other children named the same
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
This is an extract from a government xml budget document I am trying to parse. It is publicly available
I have run into this problem before. But, I am deeper into the data and the prior solution is not available
I have attached both a snippet from the XML and a simplified workflow that depicts my challenge.
The master element is ModificationItems. I need to extract data located on 3 lines:
- Title on line # 4,
- Manufacturer's Name on line #139 (which I dropped from the workflow since it is not a problem to pull in the real workflow), and
- Total Cost and its children on line #169.
But there is a problem. Total Cost is used multiple times throughout. I specifically want only the Total Cost that appears under Total Cost. I want to ignore the other total Cost items. While others look the same, I need specifically this one.
I tried to walk it down from Procurement to Total Cost to Total Cost to ignore the other Total Cost Items under other children of Procurement. It is not working. As you can see, I am getting multiple row outputs. It should be one row.
Help and thank you
Solved! Go to Solution.
- Labels:
- Parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Looking at your example, it seems it was a simple fix. Many thanks.
