Parsing XML File

(imported topic written by SystemAdmin)

Most of the posts Ive been looking at grab all the node values, Im trying to find from the first line LocalVersion=“20030131002737”

I was using (substring between “%22” of (attribute 2 of select “ns:SiteLists” of xml document of file …

what i found was that it’s not always attribute 2, sometimes it’s 2 other times its 3 and even 4

My Question is how do I just grab “LocalVersion” where ever it is ?

  • <ns:SiteLists xmlns:ns=“naSiteList” LocalVersion=“20030131002737” Type=“Client” GlobalVersion=“20100315143840”>

Products/CommonUpdater

0

f2mwBTzPQew6QNO43sH9psAU8z0HbrtfckDsdXsR/abAFPM9B3Q=s

(imported comment written by NoahSalzman)

You could always eschew xml parsing and just use Relevance’s text operators or use regex:

Q: preceding text of first “%22” of following text of firsts “LocalVersion=%22” of lines of file “c:\test.txt”

A: 20030131002737

(Text.txt was a copy/paste of the xml snippet in your post.)

(imported comment written by SystemAdmin)

Thank you noah

That works… :slight_smile: that is much simpler then node attributes