Jump to content
Sign in to follow this  

xml parsing

Recommended Posts


Hi all,

For my Automation Project.

I need to open xml file find a perticular node change its value & save it with different name.

Does any one have any idea how it is possible using basic or Auto it.



Share this post

Link to post
Share on other sites

I don't think there's real XML parsing in Autoit. You can try using StringRegExp(Replace) to parse the XML. A better idea would probably be using a real XML parser in Java/PHP/Ruby/anything else. Kinda depends on the complexity of your operations though. If you only want to replace the contents of 1 node you can just use StringRegExpReplace -- easiest if the node has a unique identifier.

For example:

$xml = _
"<xml>" & _
  "<child>this is some testdata</child>" & _

$r = StringRegExpReplace($xml, "(?i)(?s)(<child>).*(</child>)", "\1Some other data\2")
ConsoleWrite($r & @CR)
Edited by d4ni

Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  


Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.