Get the name of all Xml nodes and Attributes
How many times do we have an XML that comes from a webservice or from a source
that we don't know. In these times getting that xml to a file can be cumbersome (imagine that you have authentication). So how about a nice little way to see all the node and attribute names in that xml, here's how:
Take this xml as an example:
file
For this file we'd get something like:
NODE NAME: Mouse
NODE NAME: ScreenSaver
ATTRIBUTE OF ScreenSaver NAME: desc
NODE CHILD OF ScreenSaver NAME: Active
ATTRIBUTE OF Active NAME: desc
NODE CHILD OF ScreenSaver NAME: File
ATTRIBUTE OF File NAME: desc
NODE CHILD OF ScreenSaver NAME: Time
ATTRIBUTE OF Time NAME: desc
ATTRIBUTE OF Time NAME: min
ATTRIBUTE OF Time NAME: max
ATTRIBUTE OF Time NAME: unit
Hope this helps you out.