Application for extracting XML tags from a document

2

I am looking for an application that will extract all XML tags contained within a specific XML file. For example I would get a list: <XML_TAG_ONE>,<XML_TAG_TWO> etc...

Joel Harley

Posted 2012-04-24T10:12:25.680

Reputation: 35

Answers

2

xml2

  <foo.xml xml2 | cut -d= -f1 | sort -u

or

  <foo.xml xml2 | cut -d= -f1 | sort -u | 2xml

etc

omit the sort -u if you are interested in repetitions & duplicates.

If you don't want to see attributes

  <foo.xml xml2 | grep -v @ | cut -d= -f1 | sort -u | 2xml

If you want to use xml2 on Windows you'll probably need Cygwin or unxutils or gnuwin32 etc.

RedGrittyBrick

Posted 2012-04-24T10:12:25.680

Reputation: 70 632