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
Microsoft Access 2003 SQL Query - Changing the date format of existing text strings
Set Maximum Processor Usage
Custom GPO to change a Multi-String value in an ADM
Can I link to a local drive or program from Sharepoint 2007?
Can't create new user account. Error 8007203a.
Creating online Tutorials (What software is available for this?)
Can you add a linux box to an Active directory using the GUID?
create batch action to crop images at predefined x,y co-ordinates - URGENT!
AIX non rootvg backup of two system
Genarate mutilple PDF from Mss ACCESS REPORT