CosminV Posted July 10, 2018 Posted July 10, 2018 (edited) Hello guys, This XML things are driving me crazy... Please let me know how can I use the _XMLGetAttrib function... I've tried every possible way that I've read on the forum and I cannot succeed reading an attribute. The XML looks like bellow: <?xml version="1.0" encoding="UTF-8"?> <BATCH attr1= "aaa" attr2="bbb" attr3="ccc"> <Node1 attr1="aaa" attr2="bbb" attr3="ccc" attr4="ddd" attr5="" attr6="eee" attr7="fff" attr8="ggg"/> <Node2 attr1="aaa" attr2="" attr3="" attr4="ddd"/> <Node3 attr1="" attr2="" attr3="ccc" attr4="" attr5="" attr6="eee"/> <Panel attr1="aaa" STATUS="BBB" attr3="ccc" attr4="ddd" attr5="" attr6="eee"> <Node5 attr1="aaa" attr2="bbb" attr3="ccc" attr4="ddd" attr5="" attr6="eee" attr7="fff" attr8="ggg"/> ............................................................................................................................................................................. </Panel> </Batch> I need to read the value of STATUS form the Panel node. Could you please help me? Best regards, Cococnb Edited July 11, 2018 by CosminV
InnI Posted July 10, 2018 Posted July 10, 2018 #include <XMLDomWrapper.au3> ; https://raw.githubusercontent.com/Silvernine0S/FolderMenu3EX/master/Include/_XMLDomWrapper_.au3 _XMLFileOpen("test.xml") If @error Then Exit MsgBox(0, "Error", $sXML_error) $sVal = _XMLGetAttrib("Panel", "STATUS") MsgBox(0, "Value", $sVal) CosminV 1
CosminV Posted July 11, 2018 Author Posted July 11, 2018 Thank you Innl !!! The problem was in the file path... I forgot an "\"... and with the @error IF I realized... Thank you one more time!
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