Parsing XML
- 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
Hi Guys,
I am parsing XML data however, out of approximately 2.1Mill rows of data around 147k rows are blank for the variable I am looking to Parse. No idea why.
When I take this down to 1 trade and look at it individually , the data I need is there but comes out as a Blank . I am not sure what is different -
Here is an example of my XML and I am looking for the value after SpotWholesale (4th line down below) i.e 22329 --- Is it possible to extract this using regex ?
><SpotWholesale xmlns="RateCompositionInfo"><Value>22329</Value><State>Entered</State><CalculationMethod xsi:nil="true" /></SpotWholesale><SpotMarkup xmlns="RateCompositionInfo"><Value>0</Value><State>Calculated</State><CalculationMethod>SpotValues</CalculationMethod></SpotMarkup><SpotQuote xmlns="RateCompositionInfo"><Value>22429</Value><State>Entered</State><CalculationMethod xsi:nil="true" /></SpotQuote><ForwardWholesalePoints xmlns="RateCompositionInfo"><Value>-2</Value><State>Calculated</State>
Solved! Go to Solution.
- Labels:
- Parse
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I don't know if I really capture the point. But you can get this value just by parsing your xml with parser and specify the element from which you want to extract data (SpotWholesale in your case) as below.
Note that when you specify specific child element, it's case sensitive.
Let me know if it was what you wanted.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Are you saying the XML is blank or the value? How are you opening the XML to see this? You could use an Input file to read the XML, or just open it in a text editing software (like Notepad++) to double check. We need to make sure we have text to parse.
@Emmanuel_G has a great tip on how to use the XML parse tool. There are loads of options to identify the text we need from the XML. I'm sure the Community can find a way that works best for you.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thanks Guys , Specifically calling out the Child you want to Parse appears to be the way to go
