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
Can't connect to a Business Contacts Manager Shared Database
How do I make default "Program Files" folder somewhere else?
Coldfusion output in javascript
Paypal DoDirectPayment API in classic ASP
How to Clone two identical server running on Raid 5
sybase query showplan help
Attachments take forever to open
How to isntall the ODBC DSN for Symantec Endpoint
How to clone a laptop SATA HDD with an external SATA HDD connected via USB?
Refresh button in OWA with Exchange 2007 SP1