longjt
asked on
Cant Get element text from XML file
Just started with XML yesterday and having a slight problem. I can load the XML file and succesfully search for patters. I can get the nodes into a "nodelist" but I cant assign any veriables to the text data from the elements! Here is the code:
<%
Set XML=Server.CreateObject("M icrosoft.X MLDOM")
XML.async=false
XML.load("c:\temp\CiscoWor ks\rme.exp ort")
set nodelist = XML.selectNodes("//RMEPlat form")
rc = 0
for each node in nodelist
rc = rc + 1
response.write rc & "<br>"
cModel = node.selectSingleNode("//C isco_Chass is/model") .text
response.write cModel & "<br>"
next
%>
This is in asp. what is wrong with this?
<%
Set XML=Server.CreateObject("M
XML.async=false
XML.load("c:\temp\CiscoWor
set nodelist = XML.selectNodes("//RMEPlat
rc = 0
for each node in nodelist
rc = rc + 1
response.write rc & "<br>"
cModel = node.selectSingleNode("//C
response.write cModel & "<br>"
next
%>
This is in asp. what is wrong with this?
Nothing is wrong with it at first glance. Can you post a snippet of the XML so we can get a better idea of its structure ?
ASKER
Sure:
<?xml version="1.0" encoding='ISO-8859-1'?>
<InvDetails>
<SchemaInfo>
<RMEServer>cw-s1</RMEServe r>
<CreatedAt>Fri Nov 05 15:27:15 CST 2004</CreatedAt>
<SchemaVersion>1.0</Schema Version>
</SchemaInfo>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP08</Model>
<HardwareVersion>A0</Hardw areVersion >
<ChassisSystemType>airap12 10 </ChassisSystemType>
<NumberOfSlots>0</NumberOf Slots>
<Cisco_Card>
<SoftwareIdentity></Softwa reIdentity >
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num berOfParti tions>
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl e>
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta nceName>
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs Erasure>
<PartitionStatus>readWrite </Partitio nStatus>
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp e>
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT ype>
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"></AD>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"></AD>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
</RMEPlatform>
</InvDetails>
<?xml version="1.0" encoding='ISO-8859-1'?>
<InvDetails>
<SchemaInfo>
<RMEServer>cw-s1</RMEServe
<CreatedAt>Fri Nov 05 15:27:15 CST 2004</CreatedAt>
<SchemaVersion>1.0</Schema
</SchemaInfo>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP08</Model>
<HardwareVersion>A0</Hardw
<ChassisSystemType>airap12
<NumberOfSlots>0</NumberOf
<Cisco_Card>
<SoftwareIdentity></Softwa
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs
<PartitionStatus>readWrite
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"></AD>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"></AD>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
</RMEPlatform>
</InvDetails>
Thanks for that.
It looks like it mat be a case-sensitivity issue. XPath queries are case-sensitive.
Your current XPath says "//Cisco_Chassis/model", whereas "model" in the XML has an uppercase M.
Try:
cModel = node.selectSingleNode("//C isco_Chass is/Model") .text
Hope that helps.
It looks like it mat be a case-sensitivity issue. XPath queries are case-sensitive.
Your current XPath says "//Cisco_Chassis/model", whereas "model" in the XML has an uppercase M.
Try:
cModel = node.selectSingleNode("//C
Hope that helps.
ASKER
Yes that helped dramatically! Now however all 1200 devices are coming up with the same information.
Take out the // at the start of the query. This tells XPath to start searching from the root of the document so its always finding the first node that matches.
So you end up with:
cModel = node.selectSingleNode("Cis co_Chassis /model").t ext
This will tell XPath to search from the current context node (the current RMEPlatform node in this case).
So you end up with:
cModel = node.selectSingleNode("Cis
This will tell XPath to search from the current context node (the current RMEPlatform node in this case).
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
With this i get an error of:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'node.selectSingleNode(... )'
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'node.selectSingleNode(...
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Yes that works for getting the first node in the list. After that when you get to the second and third+ nodes the data does not increment, So I see the same data for all 1200 nodes.
Sorry, was getting my contexts mixed up :o)
The code that riyasjef posted should work ok.
The code that riyasjef posted should work ok.
ASKER
I'll try it again.
ASKER
Nope that code does the same. here is an example of what i get:
1208
VCH02-AP08
1209
VCH02-AP08
1210
VCH02-AP08
1211
VCH02-AP08
1212
VCH02-AP08
1213
VCH02-AP08
1214
VCH02-AP08
1215
VCH02-AP08
1216
VCH02-AP08
1208
VCH02-AP08
1209
VCH02-AP08
1210
VCH02-AP08
1211
VCH02-AP08
1212
VCH02-AP08
1213
VCH02-AP08
1214
VCH02-AP08
1215
VCH02-AP08
1216
VCH02-AP08
Does your XML contain 1200 RMEPlatform nodes ? If so can you post a slightly longer XML document, with, say, 3 or 4 RMEPlatform nodes ?
oh...Just change cModel = node.selectSingleNode("//C isco_Chass is/Model") .text
to
cModel = node.selectSingleNode("Cis co_Chassis /Model").t ext
RJ
to
cModel = node.selectSingleNode("Cis
RJ
ASKER
Yes, Ill post 3 full nodes:
<?xml version="1.0" encoding="ISO-8859-1"?>
<InvDetails>
<SchemaInfo>
<RMEServer>cw-s1</RMEServe r>
<CreatedAt>Fri Nov 05 15:27:15 CST 2004</CreatedAt>
<SchemaVersion>1.0</Schema Version>
</SchemaInfo>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP09</Model>
<HardwareVersion>A0</Hardw areVersion >
<ChassisSystemType>airap12 10 </ChassisSystemType>
<NumberOfSlots>0</NumberOf Slots>
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num berOfParti tions>
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl e>
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta nceName>
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs Erasure>
<PartitionStatus>readWrite </Partitio nStatus>
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp e>
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT ype>
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP09</ InstanceNa me>
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9 .1.525 </SysObjectId>
<OfficialHostName></Offici alHostName >
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I nstanceNam e>
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc eName>
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka ge>
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack age>
</RMEPlatform>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP08</Model>
<HardwareVersion>A0</Hardw areVersion >
<ChassisSystemType>airap12 10 </ChassisSystemType>
<NumberOfSlots>0</NumberOf Slots>
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num berOfParti tions>
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl e>
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta nceName>
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs Erasure>
<PartitionStatus>readWrite </Partitio nStatus>
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp e>
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT ype>
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP08</ InstanceNa me>
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9 .1.525 </SysObjectId>
<OfficialHostName></Offici alHostName >
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I nstanceNam e>
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc eName>
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka ge>
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack age>
</RMEPlatform><RMEPlatform >
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP07</Model>
<HardwareVersion>A0</Hardw areVersion >
<ChassisSystemType>airap12 10 </ChassisSystemType>
<NumberOfSlots>0</NumberOf Slots>
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num berOfParti tions>
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl e>
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta nceName>
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs Erasure>
<PartitionStatus>readWrite </Partitio nStatus>
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp e>
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT ype>
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP07</ InstanceNa me>
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9 .1.525 </SysObjectId>
<OfficialHostName></Offici alHostName >
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I nstanceNam e>
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc eName>
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte rnatePoolT ype>
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka ge>
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack age>
</RMEPlatform>
</InvDetails>
<?xml version="1.0" encoding="ISO-8859-1"?>
<InvDetails>
<SchemaInfo>
<RMEServer>cw-s1</RMEServe
<CreatedAt>Fri Nov 05 15:27:15 CST 2004</CreatedAt>
<SchemaVersion>1.0</Schema
</SchemaInfo>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP09</Model>
<HardwareVersion>A0</Hardw
<ChassisSystemType>airap12
<NumberOfSlots>0</NumberOf
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs
<PartitionStatus>readWrite
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP09</
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9
<OfficialHostName></Offici
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack
</RMEPlatform>
<RMEPlatform>
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP08</Model>
<HardwareVersion>A0</Hardw
<ChassisSystemType>airap12
<NumberOfSlots>0</NumberOf
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs
<PartitionStatus>readWrite
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP08</
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9
<OfficialHostName></Offici
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack
</RMEPlatform><RMEPlatform
<Cisco_Chassis>
<InstanceID>1</InstanceID>
<Model>VCH02-AP07</Model>
<HardwareVersion>A0</Hardw
<ChassisSystemType>airap12
<NumberOfSlots>0</NumberOf
<Cisco_Card>
<SoftwareIdentity/>
<Cisco_FlashDevice>
<InstanceID>1</InstanceID>
<InstanceName>board flash</InstanceName>
<Size>8388608 Bytes</Size>
<NumberOfPartitions>1</Num
<ChipCount>1</ChipCount>
<Description>System Flash</Description>
<Removable>false</Removabl
<Cisco_FlashPartition>
<InstanceID>1</InstanceID>
<InstanceName>flash</Insta
<Upgrade>direct</Upgrade>
<NeedsErasure>false</Needs
<PartitionStatus>readWrite
<FileSystemSize>7741440 Bytes</FileSystemSize>
<AvailableSpace>4042240 Bytes</AvailableSpace>
<FileCount>151</FileCount>
</Cisco_FlashPartition>
</Cisco_FlashDevice>
<Cisco_PhysicalMemory>
<MemoryType>RAM</MemoryTyp
<Capacity>14669824 Bytes</Capacity>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<MemoryType>NVRAM</MemoryT
<Capacity>32768 Bytes</Capacity>
<AdditionalInformation>
<AD name="NVRAMUsed" value="9512 Bytes"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
<Cisco_PhysicalMemory>
<AdditionalInformation>
<AD name="ROMVersion" value="Bootstrap program is C1200 boot loader"/>
</AdditionalInformation>
</Cisco_PhysicalMemory>
</Cisco_Card>
</Cisco_Chassis>
<Cisco_NetworkElement>
<InstanceID>1</InstanceID>
<Description>Cisco Internetwork Operating System Software
IOS (tm) C1200 Software (C1200-K9W7-M), Version 12.2(13)JA3, EARLY DEPLOYMENT RELEASE SOFTWARE (fc1)
Technical Support: http://www.cisco.com/techsupport
Copyright (c) 1986-2004 by cisco Systems, Inc.
Comp</Description>
<InstanceName>VCH02-AP07</
<PhysicalPosition>Outside room VCH 2509</PhysicalPosition>
<SysObjectId>1.3.6.1.4.1.9
<OfficialHostName></Offici
<Cisco_LogicalModule>
</Cisco_LogicalModule>
<Cisco_MemoryPool>
<InstanceName>Processor</I
<PoolType>1</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>2458788 Bytes</Allocated>
<Free>4303716 Bytes</Free>
<LargestFree>4154776 Bytes</LargestFree>
</Cisco_MemoryPool>
<Cisco_MemoryPool>
<InstanceName>I/O</Instanc
<PoolType>2</PoolType>
<AlternatePoolType>0</Alte
<IsValid>true</IsValid>
<Allocated>413008 Bytes</Allocated>
<Free>1684144 Bytes</Free>
<LargestFree>1635384 Bytes</LargestFree>
</Cisco_MemoryPool>
<AdditionalInformation>
<AD name="ConfigReg" value="0x0000000f"/>
</AdditionalInformation>
</Cisco_NetworkElement>
<Cisco_ComputerSystemPacka
<Antecedent>1</Antecedent>
<Dependent>1</Dependent>
</Cisco_ComputerSystemPack
</RMEPlatform>
</InvDetails>
Try above proposal..everything will be ok
ASKER
No with the line above i get an error:
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'node.selectSingleNode(... )'
/datafeed/test.asp, line 11
line 11 is: cModel = node.selectSingleNode("Cis co_Chassis /Model").t ext
Error Type:
Microsoft VBScript runtime (0x800A01A8)
Object required: 'node.selectSingleNode(...
/datafeed/test.asp, line 11
line 11 is: cModel = node.selectSingleNode("Cis
ASKER
OK I found whay was causing the page to only see the first node. It was the file extension. Even though the file was a valid XML file it had an export extension.
I wrote this quick test in VB and it works ok:
Set oxml = New DOMDocument40
oxml.Load "c:\temp.xml"
Set onodes = oxml.selectNodes("//RMEPla tform")
For Each node In onodes
Debug.Print node.selectSingleNode("Cis co_Chassis /Model").T ext
Next
Set oxml = New DOMDocument40
oxml.Load "c:\temp.xml"
Set onodes = oxml.selectNodes("//RMEPla
For Each node In onodes
Debug.Print node.selectSingleNode("Cis
Next
Here its ok with the test data..