Re: WSH and XML Parser
From: name (nospam_at_user.com)
Date: 05/12/04
- Next message: name: "Re: script-editor"
- Previous message: josetg: "Accessing TWAIN scanner"
- In reply to: Thomas Bosscher: "WSH and XML Parser"
- Next in thread: Viatcheslav V. Vassiliev: "Re: WSH and XML Parser"
- Messages sorted by: [ date ] [ thread ]
Date: Wed, 12 May 2004 01:52:10 -0400
Your question resembles a sitting duck for 101 computer,
spam, and from trunk of car sales pitches.
No, seriously ?
=========
Do you script the receptor interface, the one that puts the
values into e.g. windows server process ?
Do you just want to see what's there or do you want to set it ?
===========================================
Basically what you want to keep in mind is that under wsh
an error will be an error, while under hta or ie it will show 'object'
even when there are no xml data, a non existing attribute, or 'null'.
Once you pass that hurdle it is routine selectNodes or selectSingleNode.
And don't forget that you will need a password for later.
===========================================
If you use any browsers, any OS, from any location,
set a global namespace so you can access via w3.org dom.
document.getElementsByTagName("drive")[0].text
document.getElementsByName("NetworkShare")
document.getElementById("...")
attributes.getNamedItem("name")
If you use an xml parser use xPath.
And suppose your documentation gets stolen ?
Whatever scripting language you prefer, if you do not learn how to write
an xml file there is a fat chance that you will never learn how to read one.
For those who manage to set their server shares via script, in whatever
manner,
you will not see a post (that could be reciprecated OR NOT).
There are just not enough rivers, mountains, and other resources
in Redmond, Washington, Windows Land, to live and let die for prematurely.
"Thomas Bosscher" <thomasabosscher@eaton.com> wrote in message
news:c7r76k$7j1@interserv.etn.com...
> Does anyone have an example of how to retrieve data from an XML file using
> VBScript?
>
> I would like to map a set of network drives in which the data fro the
drive
> mappings are located in an xml file like the one below:
>
> <MapDrives>
> <DriveMapping name="NetworkShare">
> <Description>Network Share</Description>
> <Drive>K:</Drive>
> <Share>\\SERVER\Share\</Share>
> <Group>Group_All</Group>
> </DriveMapping>
> <DriveMapping name="AppsShare">
> <Description>Network Share</Description>
> <Drive>L:</Drive>
> <Share>\\Server\Apps\</Share>
> <Group>Group_All</Group>
> </DriveMapping>
> </MapDrives>
>
> Thanks for any direction in advance. I have been searching for an example
> online with no luck.
>
> Tom
>
>
- Next message: name: "Re: script-editor"
- Previous message: josetg: "Accessing TWAIN scanner"
- In reply to: Thomas Bosscher: "WSH and XML Parser"
- Next in thread: Viatcheslav V. Vassiliev: "Re: WSH and XML Parser"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|