If that XML file is reasonably small and well formated (one node pre line; you
can use _PSPad_ built-in function `HTML > Reformat HTML code` for that),
you could filter lines you are interested in with PSPad even without regex: just
search for ` severity="0"` (assuming no other things other than `ReportItem`s
have this property nor this tring appears anywhere else) and click
`_Copy_`: you'll get new file with lines containing such substring. This
could serve you well, but is just quick'n'dirty approach.

If you haven't XML formatted nor want to format it, regex will be necessary;
regex for `anything with severity="0"` in XML would look like
<[^ ]*( [^=]+="[^"]*")* severity="0"( [^=]+="[^"]*")*/>
assuming structure seen in your sample.

Alternatively, you can use your web _browser_'s console to peek on the XML
file (again, if it is not so huge): just open XML, press ctrl+shift+k (Firefox)
or ctrl+shift+j (Chrome) to open _console_ and input 
`$$('ReportItem[severity="0"]')`; you'll see matching nodes.

If the file is really big, I recommend dedicated application,
[url=http://www.firstobject.com/dn_editor.htm]Firstobject XML editor
(_Foxe_)[/url], which stays fast, stable and powerful (but several GB large
XML will be probably trimmed according your RAM; check statusbar). This app
should be able to help filtering real XML tree but I'm not able to use it
properly.

And if the file is really huge (GB), the last resort is command line utilities;
last time I used gnuwin ports of
_grep_ (viz http://gnuwin32.sourceforge.net/packages/grep.htm ) and
_sed_ (viz http://gnuwin32.sourceforge.net/packages/sed.htm ) to clean
several GB large XML to few MB.

-- 
<http://forum.pspad.com/read.php?2,62470,62474>
PSPad freeware editor http://www.pspad.com

Odpovedet emailem