Hi friends,

in my current project I need to deal with VERY small XML files 
with maybe up to 20 entries.

So using the XML external seems to be a bit overkill.

Some time ago I found a little reg ex here on the list which I turned
into a function and will return me everything inside of a given XML tag:
<tag1>bla bla</tag1>
<tag2>more bla bla</tag2>

So with this text above in tText and "tag2" int tTag:

function mk_getXMLdata tText, tTag
   get matchText(tText,"(?s)<" & tTag & ">(.*?)</" & tTag & ">",tValue)
   return tValue
end mk_getXMLdata

will give : more bla bla
So far so good, I even almost understand the reg ex ;-)

Now I am looking for another little snippet to (over) write something in(to) 
a certain TAG, know what I mean?

If someone could supply a nifty "replacetext" snippet that would be great! :-)
Thanks in advance!



Klaus Major

use-livecode mailing list
Please visit this url to subscribe, unsubscribe and manage your subscription 

Reply via email to