Mayur Posted February 25, 2010 Share Posted February 25, 2010 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. Thanks, Mayur Link to comment Share on other sites More sharing options...
dani Posted February 25, 2010 Share Posted February 25, 2010 (edited) 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>" & _ "</xml>" $r = StringRegExpReplace($xml, "(?i)(?s)(<child>).*(</child>)", "\1Some other data\2") ConsoleWrite($r & @CR) Edited February 25, 2010 by d4ni Link to comment Share on other sites More sharing options...
jvanegmond Posted February 25, 2010 Share Posted February 25, 2010 I don't think there's real XML parsing in Autoit.Wrong. ;DXML DOM wrapper: http://www.autoitscript.com/forum/index.php?showtopic=19848 (XML UDF) github.com/jvanegmond Link to comment Share on other sites More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now