ATTENTION: You are viewing a page formatted for mobile devices; to view the full web page, click HERE.

DonationCoder.com Software > Post New Requests Here

IDEA : XML Stripper

<< < (2/2)

rjbull:
There's even:

XMLgawk

http://home.vrweb.de/~juergen.kahrs/gawk/XML/

XMLgawk is an experimental extension of the GNU Awk interpreter. It includes a small XML parsing library which is built upon the Expat XML parser. The parsing library is a very thin layer on top of Expat (implementing a pull-interface) and can also be used without GNU Awk to read XML data files. Both, XMLgawk and its XML puller library only require an ANSI C compatible compiler (GCC works, as do most vendors' ANSI C compilers) and a 'make' program.

XMLgawk provides the following functionality:

    * AWK's way of reading data line by line is supplemented by reading XML files node by node.
[...]

--- End quote ---
Someone has compiled binaries for Windows, though it looks like you might need Cygwin or something else as well.

MilesAhead:
If you have to knock something together yourself you might try AutoIt3 using _StringBetween() function. This line I used with an xml subtitle file to get the start time:


--- ---$lines = _StringBetween($chapterTimes[$x], "<ChapterTimeStart>", "</ChapterTimeStart>")

You could have a 2 dimensional array with start and end tags you are looking for if you only need to find a few tags. If it's wide-reaching then you may need to use RegEx patterns.  But to catch simple start and end tags _StringBetween should be good enough. It's easy to use.

If it finds the delimiters it returns an array of the strings between them.

MilesAhead:
Looks like this XmlGawk mod was compiled with MinGW as stand-alone Windows binary:

http://www.wim-blit.nl/xmlgawk/XMLgawk%20for%20Windows.html

Navigation

[0] Message Index

[*] Previous page

Go to full version