Beefy Boxes and Bandwidth Generously Provided by pair Networks
Keep It Simple, Stupid
 
PerlMonks  

Re^2: Extracting xml data and using them for SNMP

by theroninwins (Friar)
on Sep 03, 2004 at 08:27 UTC ( #388224=note: print w/replies, xml ) Need Help??


in reply to Re: Extracting xml data and using them for SNMP
in thread Extracting xml data and using them for SNMP

<?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>
Here is some XML to try the code with sorry about not posting it before

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://388224]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others rifling through the Monastery: (3)
As of 2022-05-25 04:04 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?
    Do you prefer to work remotely?



    Results (84 votes). Check out past polls.

    Notices?