Hi,
Am new to scripting. :)
Am trying to figure out whether can i use bash scripting to parse an xml file.
Parsing is not just pulling out information according to the pattern but its more of a generic parsing. I should identify the xml hierarchy and pull of information. It's not a basic parsing stuff. So what you tech guys suggest for this. Will the basic bash scripts be suffice or should i go for expat xml parser or perl parsing or whatever??

Pls suggest some tools and throw some light in this.
Any help is appreciated.
Thanks in advance.

Recommended Answers

All 2 Replies

Well perl already comes with a module which uses the expat parser, and I find it to be dead easy to work with.

If you want to make yourself crazy, but learn alot about regexp in the meantime, use a bash script with sed and awk to extrapolate all the info. Basically, you're just looking to match and extract, so it can be done.

Per the post above, you could save yourself a gray hair or two using Perl's mod support for it. Depends on what you want to get out of the experience, I suppose.

, Mike

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.