You want to load locally stored XML files into Table widgets for post-processing.
The Table widget provides a path constructor parameter that loads the XML from a locally stored data file, rather from a remote Device.
For example, using the Python shell:
At this point, you can use the xcvrs tTable as if you had sourced the data directly from the Device. For further usage of the Table widget, please see the topic page, here.
Using locally stored data is often useful for post-processing automation tasks. Consider the example where you'd like to collect information on all of your pluggable transceivers in your network. You could collect that information as a series of XML files as described in the "How-To", here, If you have a collection of these XML files, you could load them into a collection of tables, as illustrated:
You can then create a collection of XcvrTable variables, like so:
Let's say you'd like to take an accounting for each Xcvr type. We know that each table item has a field called type that designates this information.
For example, the first Xcvr in the first table has a type:
So if we want to collect off the Xcvrs from all of the tables, we use two items in our Python toolbox: iterator chaining and the Counter:
The chain function allows us to iterate through a list of tables in the same way we would iterate through a list of table items. So by using chain, we can iterate through all table items.
The Counter widget allows us to create a count by each type of thing in a list. So if we produce a list of Xcvr types, the Counter widget will count up each of the individual times.
Putting these two things together looks like this:
We can then examine the type_count variable and see what we've got: