Linked Questions

13 votes
1 answer
89k views

I am trying extract some data from a bunch of xml files. Now, the issue is the structure of all the files is not exactly the same and thus, just iterating over the children and extracting the values ...
rishran's user avatar
  • 660
4 votes
4 answers
14k views

I would like to parse xml in python, but as a string, not taken from a file. Can someone help me do this?
rach's user avatar
  • 691
9 votes
2 answers
27k views

*Note: lxml will not run on my system. I was hoping to find a solution that does not involve lxml. I have gone through some of the documentation around here already, and am having difficulties ...
PleaseHelpTheNewGuy's user avatar
1 vote
3 answers
13k views

I'm new to Python and have heard that it is one of the best ways to parse fairly large XML files (150MB). I can't get my head around how to iterate through the tags and extract only the <hw> and ...
Powellellogram's user avatar
1 vote
1 answer
11k views

I have an xml which has many number of rows. For a particular given attribute id, the element name and price value should be queried. For instance, my tree looks like: <menu> <food id="1"&...
Ravi Kumar's user avatar
0 votes
1 answer
8k views

Is there a way to read an entire XML file into a Python variable with tags and indentation? data = """<?xml version="1.0" encoding="UTF-8" ?> <uimap> <page name="login"> ...
user2921139's user avatar
  • 1,799
0 votes
1 answer
6k views

I have an XML file that contains file names and file extensions that are commonly associated with ransomware and malware. Using Python, I want to parse the "Pattern Value" to simply print the value ...
VOIPSec's user avatar
0 votes
3 answers
2k views

I have the following xml file <p style="1"> A </p> <div xml:lang="unknown"> <p style="3"> B C </div> <div xml:lang="English"> <p style="5"> D </p> <...
CarefullyAdvanced's user avatar
0 votes
2 answers
3k views

So I am building a REST API in Python/Flask and I have already handled the part that enables me to read data in JSON format as follows: data = request.get_json() I was wondering if there was an xml ...
Kelyn Njeri's user avatar
-1 votes
1 answer
3k views

I have a XML file and I need to extract some numeric values. I would like to write a simple Python script, which open/reads the file and extracts these values. How can I do that? thank you very much!!...
user3546924's user avatar
0 votes
2 answers
2k views

I need to rewrite scripts from PowerShell to python and I'm new to python. How can I get value from XML response in python e.g I have a response in XML: <?xml version="1.0" encoding="utf-8"?> &...
Solaire's user avatar
  • 23
-1 votes
1 answer
1k views

I have the below xml file : <?xml version="1.0" encoding="UTF-8"?> <jcr:root xmlns:sling="http://sling.apache.org/jcr/sling/1.0" xmlns:cq="http://www.day.com/jcr/cq/1.0" xmlns:jcr="http://...
gowtham Y.R's user avatar
1 vote
1 answer
587 views

Possible Duplicate: easiest way to parse xml in python I need to parse a file which looks like an xml file but have no XML declaration. Here is an example of XML file: <connection name="...
antonjs's user avatar
  • 14.4k
0 votes
2 answers
955 views

I am trying to read the filename of an image from the XML file I run the following code: import xml.etree.ElementTree as ET tree = ET.parse(r'...\57128.xml') root = tree.getroot() a = root.find('.//...
Νικόλαος Καλαμπόκας's user avatar
-1 votes
2 answers
809 views

I want to convert the .mdx file to the .dictionary used by the MAC. So, I need to read and replace many lines in a .xml file. But my problem is there are so many different lines to replace. This is ...
J.H's user avatar
  • 15

15 30 50 per page
1
2 3 4 5
11