Re: WSH and XML Parser

From: name (nospam_at_user.com)
Date: 05/12/04


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



Relevant Pages

  • Re: using xml to save/open project data
    ... http://www.TransProCalc.org - Free translation project mgmt software ... set filename tk_getOpenfile ... Exec'ing the script you run it as a separate process, your script won't be able to access its vars. ... generating the xml file is easy enough. ...
    (comp.lang.tcl)
  • using xml to save/open project data
    ... Now, I've made a program, a translation project management tool, ... set filename tk_getOpenfile ... to run the script to reset the variables to reopen the project. ... I've been told that generating an xml file is the best way to go about ...
    (comp.lang.tcl)
  • RE: Problem with LWP::UserAgent
    ... have an xml file that contains a list of URLs. ... hash and pass them as a parameter into the function that does LWP get. ... > assume your script is named net.pl, you can involve the debugger with: ...
    (perl.beginners)
  • Re: The wonderful non-intuitive php include statement
    ... The database configuration is an XML file. ... relative paths are relative to the executing script, ...
    (comp.lang.php)
  • Odd behavior
    ... This logon script works fine for all users. ... Now on any of the users machine when they open internet explorer & type the ... Now on the users machines the mapped network drives do not all work, ...
    (microsoft.public.windows.server.general)