I need some help parsing thorugh an xml file and then take the results and
write to a formatted xml file. I made some effort. The xml sample is below.
The purpose of xml defines all the property classes we want to pull data
for. The code below actually grabs the property class. I don't know how to
read the second argument(true/false) What I would like to happen is read all
the classes but before continuing to get the values is validate wether or
not I should get values based on the true or false argument. The purpose is
to have all the properties availiable and decide what we actually want to
grab. After validating if we should pull class data, I then need to look at
each Property PName and determine if I should grab only certain pieces are
everything based on the true/false. As I cycle through each Class and get
data, I want to write that info to another xml file.(End of file with dummy
values.)



'Main
Sig()

Function Sig()
'************************************************************
' Name: Sig
' Purpose:
' Inputs: None
' Returns: None
'************************************************************
Const StoreXML_DROPOFF_DIR = "C:\"
Const StoreXML_FileName = "NewXML.xml"

Set objFSO = CreateObject("Scripting.FileSystemObject")


Set xml = CreateObject("Microsoft.XMLDOM")
XML.async = False
XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName

Set classes = XML.selectNodes("//SIGInventoryData/Class")
'numNodes = nodeList.Length

'For i = 0 To nodeList.length -1
For Each pclass In classes
className=pclass.Attributes.getNamedItem("CName").value

Set myNode = pclass.selectSingleNode("Property")
FindNodeValue = myNode.Text
WScript.Echo (className)
WScript.Echo(FindNodeValue)

Next

End Function









************************
Template xml file on what data to capture - Newxml.xml
************************

<SIGInventoryData>
<Class CName="LCD" CInventory="True">
<Property PName="brightness" PInventory="True"/>
<Property PName="backlight" PInventory="false"/>
</Class>
<Class CName="Audio" CInventory="True">
<Property PName="volumelevel" PInventory="True"/>
</Class>
</SIGInventoryData>


**********************************************
The format of the xml file with data pulled from template xml.
**********************************************
<Class CName="LCD">
<Property PName="brighness" Value="32"/>
</Class>
<Class CName="Audio">
<Property PName="volumelevel" Value="9"/>
</Class>

Re: parsing xml by Nic

Nic
Fri Apr 29 19:49:10 CDT 2005

> I don't know how to read the second argument(true/false)

If you know how to read the first argument, I do not see how you cannot read
the second one...

If this works:



"Big D" <BigDaddy@newsgroup.nospam> wrote in message
news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>I need some help parsing thorugh an xml file and then take the results and
>write to a formatted xml file. I made some effort. The xml sample is below.
>The purpose of xml defines all the property classes we want to pull data
>for. The code below actually grabs the property class. I don't know how to
>read the second argument(true/false) What I would like to happen is read
>all the classes but before continuing to get the values is validate wether
>or not I should get values based on the true or false argument. The purpose
>is to have all the properties availiable and decide what we actually want
>to grab. After validating if we should pull class data, I then need to look
>at each Property PName and determine if I should grab only certain pieces
>are everything based on the true/false. As I cycle through each Class and
>get data, I want to write that info to another xml file.(End of file with
>dummy values.)
>
>
>
> 'Main
> Sig()
>
> Function Sig()
> '************************************************************
> ' Name: Sig
> ' Purpose:
> ' Inputs: None
> ' Returns: None
> '************************************************************
> Const StoreXML_DROPOFF_DIR = "C:\"
> Const StoreXML_FileName = "NewXML.xml"
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
>
> Set xml = CreateObject("Microsoft.XMLDOM")
> XML.async = False
> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>
> Set classes = XML.selectNodes("//SIGInventoryData/Class")
> 'numNodes = nodeList.Length
>
> 'For i = 0 To nodeList.length -1
> For Each pclass In classes
> className=pclass.Attributes.getNamedItem("CName").value
>
> Set myNode = pclass.selectSingleNode("Property")
> FindNodeValue = myNode.Text
> WScript.Echo (className)
> WScript.Echo(FindNodeValue)
>
> Next
>
> End Function
>
>
>
>
>
>
>
>
>
> ************************
> Template xml file on what data to capture - Newxml.xml
> ************************
>
> <SIGInventoryData>
> <Class CName="LCD" CInventory="True">
> <Property PName="brightness" PInventory="True"/>
> <Property PName="backlight" PInventory="false"/>
> </Class>
> <Class CName="Audio" CInventory="True">
> <Property PName="volumelevel" PInventory="True"/>
> </Class>
> </SIGInventoryData>
>
>
> **********************************************
> The format of the xml file with data pulled from template xml.
> **********************************************
> <Class CName="LCD">
> <Property PName="brighness" Value="32"/>
> </Class>
> <Class CName="Audio">
> <Property PName="volumelevel" Value="9"/>
> </Class>
>
>
>
>
>
>
>
>
>
>
>
>



Re: parsing xml by Nic

Nic
Fri Apr 29 19:53:55 CDT 2005

If this works:

> className=pclass.Attributes.getNamedItem("CName").value

so should this:

bCInventory = ( pclass.Attributes.getNamedItem("CInventory").value =
"true" )


Nic Roche

"Big D" <BigDaddy@newsgroup.nospam> wrote in message
news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>I need some help parsing thorugh an xml file and then take the results and
>write to a formatted xml file. I made some effort. The xml sample is below.
>The purpose of xml defines all the property classes we want to pull data
>for. The code below actually grabs the property class. I don't know how to
>read the second argument(true/false) What I would like to happen is read
>all the classes but before continuing to get the values is validate wether
>or not I should get values based on the true or false argument. The purpose
>is to have all the properties availiable and decide what we actually want
>to grab. After validating if we should pull class data, I then need to look
>at each Property PName and determine if I should grab only certain pieces
>are everything based on the true/false. As I cycle through each Class and
>get data, I want to write that info to another xml file.(End of file with
>dummy values.)
>
>
>
> 'Main
> Sig()
>
> Function Sig()
> '************************************************************
> ' Name: Sig
> ' Purpose:
> ' Inputs: None
> ' Returns: None
> '************************************************************
> Const StoreXML_DROPOFF_DIR = "C:\"
> Const StoreXML_FileName = "NewXML.xml"
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
>
> Set xml = CreateObject("Microsoft.XMLDOM")
> XML.async = False
> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>
> Set classes = XML.selectNodes("//SIGInventoryData/Class")
> 'numNodes = nodeList.Length
>
> 'For i = 0 To nodeList.length -1
> For Each pclass In classes
> className=pclass.Attributes.getNamedItem("CName").value
>
> Set myNode = pclass.selectSingleNode("Property")
> FindNodeValue = myNode.Text
> WScript.Echo (className)
> WScript.Echo(FindNodeValue)
>
> Next
>
> End Function
>
>
>
>
>
>
>
>
>
> ************************
> Template xml file on what data to capture - Newxml.xml
> ************************
>
> <SIGInventoryData>
> <Class CName="LCD" CInventory="True">
> <Property PName="brightness" PInventory="True"/>
> <Property PName="backlight" PInventory="false"/>
> </Class>
> <Class CName="Audio" CInventory="True">
> <Property PName="volumelevel" PInventory="True"/>
> </Class>
> </SIGInventoryData>
>
>
> **********************************************
> The format of the xml file with data pulled from template xml.
> **********************************************
> <Class CName="LCD">
> <Property PName="brighness" Value="32"/>
> </Class>
> <Class CName="Audio">
> <Property PName="volumelevel" Value="9"/>
> </Class>
>
>
>
>
>
>
>
>
>
>
>
>



Re: parsing xml by Big

Big
Fri Apr 29 19:53:53 CDT 2005

I know that I get the class name so far. How do I read the property name?

For example,
Get each class and for each property get the name.

While reading the xml file how can I take my values and write them in the
format of the last xml file at end of email.


"Nic Roche" <nicroche@hotmail.com> wrote in message
news:evCIp3RTFHA.1148@tk2msftngp13.phx.gbl...
>> I don't know how to read the second argument(true/false)
>
> If you know how to read the first argument, I do not see how you cannot
> read the second one...
>
> If this works:
>
>
>
> "Big D" <BigDaddy@newsgroup.nospam> wrote in message
> news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>>I need some help parsing thorugh an xml file and then take the results and
>>write to a formatted xml file. I made some effort. The xml sample is
>>below. The purpose of xml defines all the property classes we want to pull
>>data for. The code below actually grabs the property class. I don't know
>>how to read the second argument(true/false) What I would like to happen is
>>read all the classes but before continuing to get the values is validate
>>wether or not I should get values based on the true or false argument. The
>>purpose is to have all the properties availiable and decide what we
>>actually want to grab. After validating if we should pull class data, I
>>then need to look at each Property PName and determine if I should grab
>>only certain pieces are everything based on the true/false. As I cycle
>>through each Class and get data, I want to write that info to another xml
>>file.(End of file with dummy values.)
>>
>>
>>
>> 'Main
>> Sig()
>>
>> Function Sig()
>> '************************************************************
>> ' Name: Sig
>> ' Purpose:
>> ' Inputs: None
>> ' Returns: None
>> '************************************************************
>> Const StoreXML_DROPOFF_DIR = "C:\"
>> Const StoreXML_FileName = "NewXML.xml"
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>
>>
>> Set xml = CreateObject("Microsoft.XMLDOM")
>> XML.async = False
>> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>>
>> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>> 'numNodes = nodeList.Length
>>
>> 'For i = 0 To nodeList.length -1
>> For Each pclass In classes
>> className=pclass.Attributes.getNamedItem("CName").value
>>
>> Set myNode = pclass.selectSingleNode("Property")
>> FindNodeValue = myNode.Text
>> WScript.Echo (className)
>> WScript.Echo(FindNodeValue)
>>
>> Next
>>
>> End Function
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ************************
>> Template xml file on what data to capture - Newxml.xml
>> ************************
>>
>> <SIGInventoryData>
>> <Class CName="LCD" CInventory="True">
>> <Property PName="brightness" PInventory="True"/>
>> <Property PName="backlight" PInventory="false"/>
>> </Class>
>> <Class CName="Audio" CInventory="True">
>> <Property PName="volumelevel" PInventory="True"/>
>> </Class>
>> </SIGInventoryData>
>>
>>
>> **********************************************
>> The format of the xml file with data pulled from template xml.
>> **********************************************
>> <Class CName="LCD">
>> <Property PName="brighness" Value="32"/>
>> </Class>
>> <Class CName="Audio">
>> <Property PName="volumelevel" Value="9"/>
>> </Class>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>



Re: parsing xml by Nic

Nic
Sat Apr 30 08:32:58 CDT 2005

>How do I read the property name?

For j = 0 To pclass.childNodes.Length - 1
sPropName = pclass.childNodes( j ).selectSingleNode( "PName" ).Text
Next

> format of the last xml file at end of email.

Do a transform via XSLT.

This cannot be fed to you in two lines. You need to do the yards.

MSDN has a good reference on XSL transforms.


Nic Roche

"Big D" <BigDaddy@newsgroup.nospam> wrote in message
news:%23mNxU8RTFHA.2916@TK2MSFTNGP15.phx.gbl...
>I know that I get the class name so far. How do I read the property name?
>
> For example,
> Get each class and for each property get the name.
>
> While reading the xml file how can I take my values and write them in the
> format of the last xml file at end of email.
>
>
> "Nic Roche" <nicroche@hotmail.com> wrote in message
> news:evCIp3RTFHA.1148@tk2msftngp13.phx.gbl...
>>> I don't know how to read the second argument(true/false)
>>
>> If you know how to read the first argument, I do not see how you cannot
>> read the second one...
>>
>> If this works:
>>
>>
>>
>> "Big D" <BigDaddy@newsgroup.nospam> wrote in message
>> news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>>>I need some help parsing thorugh an xml file and then take the results
>>>and write to a formatted xml file. I made some effort. The xml sample is
>>>below. The purpose of xml defines all the property classes we want to
>>>pull data for. The code below actually grabs the property class. I don't
>>>know how to read the second argument(true/false) What I would like to
>>>happen is read all the classes but before continuing to get the values is
>>>validate wether or not I should get values based on the true or false
>>>argument. The purpose is to have all the properties availiable and decide
>>>what we actually want to grab. After validating if we should pull class
>>>data, I then need to look at each Property PName and determine if I
>>>should grab only certain pieces are everything based on the true/false.
>>>As I cycle through each Class and get data, I want to write that info to
>>>another xml file.(End of file with dummy values.)
>>>
>>>
>>>
>>> 'Main
>>> Sig()
>>>
>>> Function Sig()
>>> '************************************************************
>>> ' Name: Sig
>>> ' Purpose:
>>> ' Inputs: None
>>> ' Returns: None
>>> '************************************************************
>>> Const StoreXML_DROPOFF_DIR = "C:\"
>>> Const StoreXML_FileName = "NewXML.xml"
>>>
>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>
>>>
>>> Set xml = CreateObject("Microsoft.XMLDOM")
>>> XML.async = False
>>> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>>>
>>> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>>> 'numNodes = nodeList.Length
>>>
>>> 'For i = 0 To nodeList.length -1
>>> For Each pclass In classes
>>> className=pclass.Attributes.getNamedItem("CName").value
>>>
>>> Set myNode = pclass.selectSingleNode("Property")
>>> FindNodeValue = myNode.Text
>>> WScript.Echo (className)
>>> WScript.Echo(FindNodeValue)
>>>
>>> Next
>>>
>>> End Function
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ************************
>>> Template xml file on what data to capture - Newxml.xml
>>> ************************
>>>
>>> <SIGInventoryData>
>>> <Class CName="LCD" CInventory="True">
>>> <Property PName="brightness" PInventory="True"/>
>>> <Property PName="backlight" PInventory="false"/>
>>> </Class>
>>> <Class CName="Audio" CInventory="True">
>>> <Property PName="volumelevel" PInventory="True"/>
>>> </Class>
>>> </SIGInventoryData>
>>>
>>>
>>> **********************************************
>>> The format of the xml file with data pulled from template xml.
>>> **********************************************
>>> <Class CName="LCD">
>>> <Property PName="brighness" Value="32"/>
>>> </Class>
>>> <Class CName="Audio">
>>> <Property PName="volumelevel" Value="9"/>
>>> </Class>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>



Re: parsing xml by Big

Big
Sun May 01 19:26:59 CDT 2005

I am getting the following error:
LCD
C:\sigassetsxml.vbs(34, 6) Microsoft VBScript runtime error: Object
required: 'pclass.childNodes(...).selectSingleNode(...)'

I can't seem to get the property but getting the class.


'Main
Sig()



Function Sig()
'************************************************************
' Name: Sig
' Purpose:
' Inputs: None
' Returns: None
'************************************************************
Const StoreXML_DROPOFF_DIR = "C:\"
Const StoreXML_FileName = "NewXML.xml"

Set objFSO = CreateObject("Scripting.FileSystemObject")


Set xml = CreateObject("Microsoft.XMLDOM")
XML.async = False
XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName

Set classes = XML.selectNodes("//SIGInventoryData/Class")

For Each pclass In classes
className=pclass.Attributes.getNamedItem("CName").value

WScript.Echo (className)

For j = 0 To pclass.childNodes.Length - 1
sPropName = pclass.childNodes(j).selectSingleNode("PName").Text
WScript.Echo(sPropName)
Next

Next

End Function









"Nic Roche" <nicroche@hotmail.com> wrote in message
news:%23cotM6RTFHA.2908@TK2MSFTNGP10.phx.gbl...
> If this works:
>
>> className=pclass.Attributes.getNamedItem("CName").value
>
> so should this:
>
> bCInventory = ( pclass.Attributes.getNamedItem("CInventory").value =
> "true" )
>
>
> Nic Roche
>
> "Big D" <BigDaddy@newsgroup.nospam> wrote in message
> news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>>I need some help parsing thorugh an xml file and then take the results and
>>write to a formatted xml file. I made some effort. The xml sample is
>>below. The purpose of xml defines all the property classes we want to pull
>>data for. The code below actually grabs the property class. I don't know
>>how to read the second argument(true/false) What I would like to happen is
>>read all the classes but before continuing to get the values is validate
>>wether or not I should get values based on the true or false argument. The
>>purpose is to have all the properties availiable and decide what we
>>actually want to grab. After validating if we should pull class data, I
>>then need to look at each Property PName and determine if I should grab
>>only certain pieces are everything based on the true/false. As I cycle
>>through each Class and get data, I want to write that info to another xml
>>file.(End of file with dummy values.)
>>
>>
>>
>> 'Main
>> Sig()
>>
>> Function Sig()
>> '************************************************************
>> ' Name: Sig
>> ' Purpose:
>> ' Inputs: None
>> ' Returns: None
>> '************************************************************
>> Const StoreXML_DROPOFF_DIR = "C:\"
>> Const StoreXML_FileName = "NewXML.xml"
>>
>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>
>>
>> Set xml = CreateObject("Microsoft.XMLDOM")
>> XML.async = False
>> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>>
>> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>> 'numNodes = nodeList.Length
>>
>> 'For i = 0 To nodeList.length -1
>> For Each pclass In classes
>> className=pclass.Attributes.getNamedItem("CName").value
>>
>> Set myNode = pclass.selectSingleNode("Property")
>> FindNodeValue = myNode.Text
>> WScript.Echo (className)
>> WScript.Echo(FindNodeValue)
>>
>> Next
>>
>> End Function
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> ************************
>> Template xml file on what data to capture - Newxml.xml
>> ************************
>>
>> <SIGInventoryData>
>> <Class CName="LCD" CInventory="True">
>> <Property PName="brightness" PInventory="True"/>
>> <Property PName="backlight" PInventory="false"/>
>> </Class>
>> <Class CName="Audio" CInventory="True">
>> <Property PName="volumelevel" PInventory="True"/>
>> </Class>
>> </SIGInventoryData>
>>
>>
>> **********************************************
>> The format of the xml file with data pulled from template xml.
>> **********************************************
>> <Class CName="LCD">
>> <Property PName="brighness" Value="32"/>
>> </Class>
>> <Class CName="Audio">
>> <Property PName="volumelevel" Value="9"/>
>> </Class>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>
>



Re: parsing xml by Brian

Brian
Sun May 01 19:48:07 CDT 2005

Big D wrote:
> I am getting the following error:
> LCD
> C:\sigassetsxml.vbs(34, 6) Microsoft VBScript runtime error: Object
> required: 'pclass.childNodes(...).selectSingleNode(...)'
>
> I can't seem to get the property but getting the class.
>
>
> 'Main
> Sig()
>
>
>
> Function Sig()
> '************************************************************
> ' Name: Sig
> ' Purpose:
> ' Inputs: None
> ' Returns: None
> '************************************************************
> Const StoreXML_DROPOFF_DIR = "C:\"
> Const StoreXML_FileName = "NewXML.xml"
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
>
> Set xml = CreateObject("Microsoft.XMLDOM")
> XML.async = False
> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>
> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>
> For Each pclass In classes
> className=pclass.Attributes.getNamedItem("CName").value
>
> WScript.Echo (className)
>
> For j = 0 To pclass.childNodes.Length - 1
> sPropName = pclass.childNodes(j).selectSingleNode("PName").Text
> WScript.Echo(sPropName)
> Next

Should that perhaps be "/PName"? I'm just a dabbler, but that's the
format I've used in my limited XML experience.

Re: parsing xml by Nic

Nic
Sun May 01 22:43:12 CDT 2005

>Object required:

oops:
sPropName = pclass.childNodes(j).selectSingleNode("PName").Text
should be
sPropName = pclass.childNodes(j).selectSingleNode("@PName").Text

BTW: this makes for tightly coupled code - XSLT is your best bet...

Nic

"Big D" <BigDaddy@newsgroup.nospam> wrote in message
news:%23%23zdj2qTFHA.2128@TK2MSFTNGP15.phx.gbl...
>I am getting the following error:
> LCD
> C:\sigassetsxml.vbs(34, 6) Microsoft VBScript runtime error: Object
> required: 'pclass.childNodes(...).selectSingleNode(...)'
>
> I can't seem to get the property but getting the class.
>
>
> 'Main
> Sig()
>
>
>
> Function Sig()
> '************************************************************
> ' Name: Sig
> ' Purpose:
> ' Inputs: None
> ' Returns: None
> '************************************************************
> Const StoreXML_DROPOFF_DIR = "C:\"
> Const StoreXML_FileName = "NewXML.xml"
>
> Set objFSO = CreateObject("Scripting.FileSystemObject")
>
>
> Set xml = CreateObject("Microsoft.XMLDOM")
> XML.async = False
> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>
> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>
> For Each pclass In classes
> className=pclass.Attributes.getNamedItem("CName").value
>
> WScript.Echo (className)
>
> For j = 0 To pclass.childNodes.Length - 1
> sPropName = pclass.childNodes(j).selectSingleNode("PName").Text
> WScript.Echo(sPropName)
> Next
>
> Next
>
> End Function
>
>
>
>
>
>
>
>
>
> "Nic Roche" <nicroche@hotmail.com> wrote in message
> news:%23cotM6RTFHA.2908@TK2MSFTNGP10.phx.gbl...
>> If this works:
>>
>>> className=pclass.Attributes.getNamedItem("CName").value
>>
>> so should this:
>>
>> bCInventory = ( pclass.Attributes.getNamedItem("CInventory").value =
>> "true" )
>>
>>
>> Nic Roche
>>
>> "Big D" <BigDaddy@newsgroup.nospam> wrote in message
>> news:eG8VVBRTFHA.228@TK2MSFTNGP12.phx.gbl...
>>>I need some help parsing thorugh an xml file and then take the results
>>>and write to a formatted xml file. I made some effort. The xml sample is
>>>below. The purpose of xml defines all the property classes we want to
>>>pull data for. The code below actually grabs the property class. I don't
>>>know how to read the second argument(true/false) What I would like to
>>>happen is read all the classes but before continuing to get the values is
>>>validate wether or not I should get values based on the true or false
>>>argument. The purpose is to have all the properties availiable and decide
>>>what we actually want to grab. After validating if we should pull class
>>>data, I then need to look at each Property PName and determine if I
>>>should grab only certain pieces are everything based on the true/false.
>>>As I cycle through each Class and get data, I want to write that info to
>>>another xml file.(End of file with dummy values.)
>>>
>>>
>>>
>>> 'Main
>>> Sig()
>>>
>>> Function Sig()
>>> '************************************************************
>>> ' Name: Sig
>>> ' Purpose:
>>> ' Inputs: None
>>> ' Returns: None
>>> '************************************************************
>>> Const StoreXML_DROPOFF_DIR = "C:\"
>>> Const StoreXML_FileName = "NewXML.xml"
>>>
>>> Set objFSO = CreateObject("Scripting.FileSystemObject")
>>>
>>>
>>> Set xml = CreateObject("Microsoft.XMLDOM")
>>> XML.async = False
>>> XML.load StoreXML_DROPOFF_DIR & StoreXML_FileName
>>>
>>> Set classes = XML.selectNodes("//SIGInventoryData/Class")
>>> 'numNodes = nodeList.Length
>>>
>>> 'For i = 0 To nodeList.length -1
>>> For Each pclass In classes
>>> className=pclass.Attributes.getNamedItem("CName").value
>>>
>>> Set myNode = pclass.selectSingleNode("Property")
>>> FindNodeValue = myNode.Text
>>> WScript.Echo (className)
>>> WScript.Echo(FindNodeValue)
>>>
>>> Next
>>>
>>> End Function
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> ************************
>>> Template xml file on what data to capture - Newxml.xml
>>> ************************
>>>
>>> <SIGInventoryData>
>>> <Class CName="LCD" CInventory="True">
>>> <Property PName="brightness" PInventory="True"/>
>>> <Property PName="backlight" PInventory="false"/>
>>> </Class>
>>> <Class CName="Audio" CInventory="True">
>>> <Property PName="volumelevel" PInventory="True"/>
>>> </Class>
>>> </SIGInventoryData>
>>>
>>>
>>> **********************************************
>>> The format of the xml file with data pulled from template xml.
>>> **********************************************
>>> <Class CName="LCD">
>>> <Property PName="brighness" Value="32"/>
>>> </Class>
>>> <Class CName="Audio">
>>> <Property PName="volumelevel" Value="9"/>
>>> </Class>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>
>>
>
>