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
web directory permission drwxr-xr-x
ActionScript and HTTP_REFERER
Multiple connections to a server or shared resource by the same user using more than one user name are not allowed.
Trying to Force a Particualr Windows Color Scheme through group polciy and cannot find where to set it at
EXCHANGE 2003 - STORE WILL NOT MOUNT
Quark 5.0 error message "Insufficient disk space...."
virus issue
Disable Win XP auto-created printer from being auto-created by Citrix
Hidden task bar intermittently doesn't appear.
Hyper-V Networking INternal Network