Jump to content

General XML reader


Recommended Posts

OK, I looked around here and did not find what I think I am looking for.

What I want is a "generic" XML reader - something that will read a complete XML file and give me the nodes with their values in some sort of array. 

Does this sound OK?  I am not an XML guru nor a great programmer.  I just need to get any XML file and be able to parse and use the XML information.

Thanks

E

Link to comment
Share on other sites

Have you tried coding anything? We won't write for you :geek:

info: >XML DOM wrapper(COM)

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

Have you tried coding anything? We won't write for you :geek:

info: >XML DOM wrapper(COM)

 

I understand that.  But, I am having a difficult time trying to see how to get this started.  I don't really "comprehend" the XML DOM functions so need some helping hands with that.

Does the XML DOM have the ability to just read the file and store the information like I think I need it to be stored - in array(s)?

Thanks

E

Link to comment
Share on other sites

This might help: link :P

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

This might help: link :P

 

Thanks for the link.  It is, however, different in that it is looking at a "known" XML schema.  I want to be able to do any XML file. 

I am starting to code something but not sure where it may take me.

Still need some "guidance" on a true generic XML parser/reader.

E

Link to comment
Share on other sites

@dickep did you take a look at that UDF - >XML DOM wrapper  I looked through it and I can see a function called

_AddFormat

It might be worth your while to have a look in that UDF.

Edited by MikahS

Snips & Scripts


My Snips: graphCPUTemp ~ getENVvars
My Scripts: Short-Order Encrypter - message and file encryption V1.6.1 ~ AuPad - Notepad written entirely in AutoIt V1.9.4

Feel free to use any of my code for your own use.                                                                                                                                                           Forum FAQ

 

Link to comment
Share on other sites

couple of examples:

$oXML = ObjCreate("Microsoft.XMLDOM")
$sXML = "<root><something><somethingelse>value</somethingelse></something></root>"
$oXML.loadXML($sXML)

$oNodes = $oXML.selectSingleNode("//something")
For $oNode In $oNodes.childnodes
    ConsoleWrite($oNode.text & @CRLF)
Next

$oNode = $oXML.selectSingleNode("//something/somethingelse")
ConsoleWrite($oNode.text & @CRLF)

if you are loading a file, use:

$oXML.Load("c:\your\file\here.xml")
Edited by jdelaney
IEbyXPATH-Grab IE DOM objects by XPATH IEscriptRecord-Makings of an IE script recorder ExcelFromXML-Create Excel docs without excel installed GetAllWindowControls-Output all control data on a given window.
Link to comment
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
 Share

  • Recently Browsing   0 members

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