Here is some XML to try the code with sorry about not posting it before<?xml version="1.0" encoding="UTF-8" ?> - <CMData> <CMServer>BIBAS03</CMServer> <CreatedAt>Tue Aug 24 09:09:41 GMT+02:00 2004</CreatedAt> <SchemaVersion>1.0</SchemaVersion> <Heading>Topology Data</Heading> - <Layer2Details> - <Device> <DeviceName>LWL-H91-CW-4-5-4.bc.de.bic</DeviceName> <IPAddress>148.192.59.254</IPAddress> <DeviceState>Reachable</DeviceState> <DeviceType>C2950G-24</DeviceType> - <Neighbors> - <Neighbor> <NeighborIPAddress>148.192.22.22</NeighborIPAddress> <NeighborDeviceType>C6506</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Gi0/2</LocalPort> <RemotePort>3/3</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.22.18</NeighborIPAddress> <NeighborDeviceType>C6509</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Gi0/1</LocalPort> <RemotePort>3/3</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.59.253</NeighborIPAddress> <NeighborDeviceType>C2950-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/1</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.59.252</NeighborIPAddress> <NeighborDeviceType>C2950-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/2</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> </Neighbors> </Device> - <Device> <DeviceName>stp-g91-cw-2-1-3.bc.de.bic</DeviceName> <IPAddress>148.192.166.249</IPAddress> <DeviceState>Reachable</DeviceState> <DeviceType>C2950-24</DeviceType> - <Neighbors> - <Neighbor> <NeighborIPAddress>148.192.166.254</NeighborIPAddress> <NeighborDeviceType>C2950G-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/1</LocalPort> <RemotePort>Fa0/3</RemotePort> </Neighbor> </Neighbors> </Device> - <Device> <DeviceName>stp-k41-cw-e-2-2.bc.de.bic</DeviceName> <IPAddress>148.192.86.253</IPAddress> <DeviceState>Reachable</DeviceState> <DeviceType>C2924XLV</DeviceType> - <Neighbors> - <Neighbor> <NeighborIPAddress>148.192.86.254</NeighborIPAddress> <NeighborDeviceType>C2950G-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/1</LocalPort> <RemotePort>Fa0/4</RemotePort> </Neighbor> </Neighbors> </Device> - <Device> <DeviceName>stp-j51-cw-1-2-2.bc.de.bic</DeviceName> <IPAddress>148.192.88.253</IPAddress> <DeviceState>Reachable</DeviceState> <DeviceType>C2950-24</DeviceType> - <Neighbors> - <Neighbor> <NeighborIPAddress>148.192.88.254</NeighborIPAddress> <NeighborDeviceType>C2950G-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/1</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> </Neighbors> </Device> - <Device> <DeviceName>lwl-h81-cw-u-1-1.bc.de.bic</DeviceName> <IPAddress>148.192.74.254</IPAddress> <DeviceState>Reachable</DeviceState> <DeviceType>C2950G-24</DeviceType> - <Neighbors> - <Neighbor> <NeighborIPAddress>148.192.74.251</NeighborIPAddress> <NeighborDeviceType>C2950-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/13</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.22.14</NeighborIPAddress> <NeighborDeviceType>C6506</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Gi0/2</LocalPort> <RemotePort>4/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.22.10</NeighborIPAddress> <NeighborDeviceType>C6506</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Gi0/1</LocalPort> <RemotePort>4/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.74.249</NeighborIPAddress> <NeighborDeviceType>C2950-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/6</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.74.250</NeighborIPAddress> <NeighborDeviceType>C2950-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/5</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> - <Neighbor> <NeighborIPAddress>148.192.74.253</NeighborIPAddress> <NeighborDeviceType>C2950C-24</NeighborDeviceType> <Link>Point to Point link</Link> <LocalPort>Fa0/24</LocalPort> <RemotePort>Fa0/1</RemotePort> </Neighbor> </Neighbors> </Device> </Layer2Details> </CMData>
In reply to Re^2: Extracting xml data and using them for SNMP
by theroninwins
in thread Extracting xml data and using them for SNMP
by theroninwins
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |