Jump to content
Sign in to follow this  

_XMLDomWrapper.au3 ---> _XMLFileOpen ---> Failure

Recommended Posts


Hi I have problem with my code. 

_XMLFileOpen function failures with no error so I am not able to process XML.... (code -1; error 0)

Do anybody know, what is a problem?

code sample:

#include <_XMLDomWrapper.au3>

$XMLFile = @ScriptDir & "\distance.xml"
 If NOT FileExists($XMLFile) then Exit (Msgbox(0,"",$XMLFile & " does not exist"))
ConsoleWrite("Xml file open " & _XMLFileOpen($XMLFile))
ConsoleWrite(@crlf & @Error & @crlf)
ConsoleWrite("Value" & _XMLGetValue("/DistanceMatrixResponse/row/element/distance/value"))
ConsoleWrite(@crlf & @Error & @crlf)
Xml file:
<origin_address>Praha, Česká republika</origin_address>
<destination_address>Hradec Králové, Česká republika</destination_address>
<text>1 hodin, 12 minut</text>
<text>113 km</text>


Xml file open -1


Share this post

Link to post
Share on other sites


Thanks All. Code works fine.

Problem was with Xml file.

I saved that file with copy->paste from web browser.

When I saved file directly, It worked fine (save link as).

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.