Microsoft
Software
Hardware
Network
Question : parse xml with python
i need to read in an xml file and find several attributes in it. For example i need to get the ip address and service name IIS Admin out of this xml:
...
/>
...
....
Answer : parse xml with python
you should use a XML parser, eg PyXML. However, if your request is just extract these 2 information, just simple string manipulation will do
1: 2: 3: 4: 5: 6: 7: 8: 9: 10: 11:
for line in open("xmlfile"): if "" in line: f=1 if f : if "
Open in New Window
Select All
Random Solutions
When form open, creates blank file in table
Invalid attribute in connection string: Server.
What does "(or .)" mean in the statement "script0 will see the variables only if it calls script1 with source (or .)"
Domino Clusters
Why can't Norton Ghost 12.0 connect to the Norton Ghost service?
(20)532 Cannot find database DLL
Visual Studio 2005 not installing on Vista
Windows XP hang loading agp440.sys
Inner/Outer join ?
McAfee VirusScan