Jump to content

Recommended Posts

Posted (edited)

I tried searching but couldn't find any relevant information that was helpful to me. Im trying to get the xml off a currently loaded IE page but can't seem to figure it out.

$oIE = _IEAttach("The World of Warcraft Armory")
_IENavigate($oIE,"http://www.wowarmory.com/character-sheet.xml?r=Anub%27arak&n=Lovepenguin")
_IELoadWait($oIE)

How can I get the xml of the oIE object. _IEDocReadHTML just gives the html of the page not the xml.

Also I have to use the oIE object because I need the xml of the page after someone has logged in. So if we create a new object it won't have the user already logged in.

Edited by rejectpenguin
Posted (edited)

After going through quite a few COM objects after not even knowing what COM objects were at first I figured out that a simple method would be to use the XMLDocument COM. Then use the XMLDomWrapper library.

$oXML = $oIE.document.XMLDocument 

_XMLFileOpen($oXML)

Simple and it works awesome!

Edited by rejectpenguin
Posted (edited)

Oy, apparently it doesn't like me using the COM I am now getting spammed with errors if I try and use the $oIE object.

--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)

_IENavigate($oIE,"http://www.wowarmory.com/character-sheet.xml?r=Anub%27arak&n=Lovepenguin")
_IELoadWait($oIE)


$oXML = $oIE.document.XMLDocument
...
_IENavigate($oIE,"http://www.google.com")
Edited by rejectpenguin
Posted

  On 8/7/2010 at 11:46 PM, 'rejectpenguin said:

Oy, apparently it doesn't like me using the COM I am now getting spammed with errors if I try and use the $oIE object.

--> IE.au3 V2.4-0 Warning from function internal function __IEIsObjType, Cannot register internal error handler, cannot trap COM errors (Use _IEErrorHandlerRegister() to register a user error handler)

_IENavigate($oIE,"http://www.wowarmory.com/character-sheet.xml?r=Anub%27arak&n=Lovepenguin")
_IELoadWait($oIE)


$oXML = $oIE.document.XMLDocument
...
_IENavigate($oIE,"http://www.google.com")

If you use the errorhandler suggestion in the output, you may get more info to pin down what exactly is going wrong
Posted (edited)

  On 8/8/2010 at 1:49 AM, 'cameronsdad said:

If you use the errorhandler suggestion in the output, you may get more info to pin down what exactly is going wrong

I put _IEErrorHandlerRegister() at the beginning of the script and now it shows no errors. So I guess the only error was not having an error handler! Thanks!

Edited by rejectpenguin

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
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...