Sign in to follow this  
Followers 0
Sreekanth

XML file parsing error with XMLDomWrapper.au3

6 posts in this topic

Hya

I am getting XML file parsing error with XMLDomWrapper.au3, with @EXTENDED this is error code of MSXML I am getting - "-1072896737". Can somebody help me? or suggest any other parser in autoit.

using _XMLFileOpen($XMLfile,"",-1) call.

Thanks in advance

Sreekanth.

Share this post


Link to post
Share on other sites



Are you able to post the file?

The XMLDomWrapper works fine.

Are you sure the path to the file is correct?

You don't really provide much information.

Local $XMLfile = "C:\MyXmlFile.xml"
 If NOT FileExists($XMLFile) then Exit (Msgbox(0,"",$XMLFile & " does not exist"))
 _XMLFileOpen($XMLfile)

Share this post


Link to post
Share on other sites

Path is correct, I have attached the file. I couldn't open file with _XMLFileOpen call.

I want to parse this file and print the values of attribute nodes "name" of element node "file3"

Files.xml

Share this post


Link to post
Share on other sites

This part is triggering "Invalid Unicode Character":

publisher="VeriSign Class 3 Code Signing 2004 CA�" vendor="McAfee, Inc.�" start="09/13/2008  05:30�" expiry="10/10/2011  05:29�"

Why are you inserting null characters with "�"?

BTW, you can see debugging info by setting $debugging = True. It's an undocumented global variable declared inside _XMLDOMWrapper.au3.

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

Share this post


Link to post
Share on other sites

This file is input to my script which is generated by an application, this is not under my control. Is there any way to handle this with XMLDomWrapper?

BTW, Thanks for the info on debugging :)

Share this post


Link to post
Share on other sites

No, but since you don't need those nulls in your results, you could just remove them with string manipulation before loading:

$sXmlData = StringReplace(FileRead($sXmlFile), "�", "")
$iRET = _XMLLoadXML($sXmlData)

:)


Valuater's AutoIt 1-2-3, Class... Is now in Session!For those who want somebody to write the script for them: RentACoder"Any technology distinguishable from magic is insufficiently advanced." -- Geek's corollary to Clarke's law

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  
Followers 0