XML Data Extraction

I have a folder full of XML files, and I want to extract two or three fields out of each XML file and write them to a single file. I did a search, found some promising routines, but none panned out.

Anyone have a decent XML data extraction utility?
 

LibertyBeacon

Unto dust we shall return
I have a folder full of XML files, and I want to extract two or three fields out of each XML file and write them to a single file. I did a search, found some promising routines, but none panned out.

Anyone have a decent XML data extraction utility?

Not sure what platform you're on, but if you have a search utility which uses regular expressions (UNIX genesis but exists everywhere nowadays), it's fairly straight forward.

A pattern like:

HTML:
"<(some_pattern_here)>(.*?)</some_pattern_here>"

(no quotes; hoping the markdown doesn't eat my formatting.)

should match any random tag you substitute for "some_pattern_here"

Been a while since I've done these on the fly, there are a ton of references out there.

EDIT: Yes, the markdown is chewing up my formatting. I will see if I can fix this, but my laptop battery is about ate up. Sorry!
 
Last edited:

LibertyBeacon

Unto dust we shall return
So it looks like
Code:
 isn't recognized here. How can I post something literal and not have markdown mess with it so I can provide a complete example to OP?
 
Top