Tagged Questions
0
votes
0answers
9 views
OpenERP Filter by function in View.xml
In my Leave approve model I need to get only employees who are reported to logged manager.
So seems to have a function filtering in my tree view. but how to add filter to view xml without context or ...
1
vote
1answer
11 views
preserve entity references when parsing xml
Running the following simple script:
from lxml import etree
tree = etree.parse('VimKeys.xml')
root = tree.getroot()
for child in root:
print ("<table>")
print ("<caption>" + ...
1
vote
2answers
38 views
Clear new lines in docx
I've a docx file, this contains a lot of new lines between sections, I need to clear a new line when it appears on more than one occasion consecutively. I unzip the file using:
z = ...
0
votes
1answer
40 views
Python not looping properly over xml file
I'm having difficultly getting python to loop / iterate over an xml file. I am able to load the file and get to each element, but the variable assignment (inside an inner loop) never seems to move ...
1
vote
2answers
57 views
copying input xml file and write exactly with Python
Input xml file:
<?xml version="1.0"?>
<res:testcases xmlns:res="urn:testcases" id="a1e4bfdb-40a2-485c-a1ac-54d220056dd5" type="MODEL">
<mode>PRESSURE_CONTROL</mode>
...
0
votes
2answers
30 views
merging xml files using Element Tree in Python
I'm trying to merge two xml files. The files contain the same overall structure but the details are different.
file1.xml:
<book>
<chapter id="113">
<sentence id="1">
...
1
vote
1answer
21 views
convert lxml to scrapy xxs selector
How can I convert this pure python lxml to scrapy built in xxs selectors? This one works but i want to convert this to the scrapy xxs selectors.
def parse_device_list(self, response):
...
0
votes
0answers
32 views
access search from XML file
my code make a search in XML file ( the function "findTerminal") for a specific attribute name and pass it to an other function ( called DBAccess) to find that attribut in access database .
the ...
1
vote
0answers
27 views
Read MS Excel XML file to pandas dataframe?
I have an MS Excel XML (2003) file with the following metadata:
<?xml version="1.0" encoding="UTF-8"?>
<?mso-application progid="Excel.Sheet"?><Workbook ...
1
vote
1answer
17 views
XML (.xsd) feed validation against a schema
I have a XML file and I have a XML schema. I want to validate the file against that schema and check if it adheres to that. I am using python but am open to any language for that matter if there is no ...
0
votes
0answers
25 views
Getting scrapy to display the items for pure lxml etree
I am using scrapy with pure lxml. How can I get my code to display in a nice csv list of items, with the link and title. I need my code to display it like this below. I get i different output in the ...
1
vote
1answer
26 views
Element Tree doesn't load a Google Earth-exported KML
I have a problem related to a Google Earth exported KML, as it doesn't seem to work well with Element Tree. I don't have a clue where the problem might lie, so I will explain how I do everything.
...
1
vote
3answers
54 views
creating a xml file with For Loop in python
I have a txt file contains more than 100 thousands lines, and for each line I want to create a XML tree. BUT all lines are sharing the same root.
Here the txt file:
LIBRARY:
1,1,1,1,the
...
0
votes
1answer
53 views
finding a missing tags
i am would like to make a test on XML file to find the place where a specific TAG is missing ( the TAG 'Terminal'), but my test don't work well
from xml.dom import minidom
xmldoc = ...
0
votes
0answers
28 views
Using Python Minidom, how can I access the values? [duplicate]
Say I have an XML file like this:
<root>
<foo>
<id>123</id>
<value>456</value>
</foo>
<foo>
<id>345</id>
...