Questions tagged [amara]
7 questions
5
votes
1 answer
Printing Attribute Values in python-amara
I'm trying to parse an xml file with using python-amara.
doc = amara.parse('h.xml')
assert doc.xml_type == tree.entity.xml_type
m = doc.xml_children[0]
print m
When I do this it gives
amara.tree.element at 0x94c864c: name u'HOP', 0 namespaces,…

iva123
- 3,395
- 10
- 47
- 68
5
votes
2 answers
How to validate an xml file against an XSD Schema using Amara library in Python?
High bounty for the following Q:
Hello,
Here is what I tried on Ubuntu 9.10 using Python 2.6, Amara2
(by the way, test.xsd was created using xml2xsd tool):
g@spot:~$ cat test.xml; echo =====o=====; cat test.xsd; echo ====
o=====; cat test.py;…

Hamish Grubijan
- 10,562
- 23
- 99
- 147
2
votes
1 answer
amara and django
I am trying to do webservice calls with django views using Amara library.
However anytime I do import amara (by simply importing it!) and call a django view with it imported, I get such errors:
Environment:
Request Method: GET
Request URL:…

Hellnar
- 62,315
- 79
- 204
- 279
1
vote
1 answer
Switching from amara to lxml in Python
I am trying to accomplish with lxml library something like this:
http://www.xml.com/pub/a/2005/01/19/amara.html
from amara import binderytools
container = binderytools.bind_file('labels.xml')
for l in container.labels.label:
print l.name, 'of',…

Hamish Grubijan
- 10,562
- 23
- 99
- 147
1
vote
1 answer
Python error: I am unable to install amara using pip
(PWPYTHON)ubuntu@ip-10-224-6-63:~$ pip install amara
Requirement already satisfied (use --upgrade to upgrade): amara in ./PWPYTHON/lib/python2.7/site-packages
Downloading/unpacking 4Suite-XML>=1.0.2 (from amara) Downloading 4Suite-XML-1.0.2.zip…

Aashish P
- 1,894
- 5
- 22
- 36
0
votes
2 answers
Cannot run the Unisubs (amara) repo on Github
In this repo: https://github.com/pculture/unisubs,
I followed its "Quick start" but at step 3 I got this error:
"...
Get:13 http://archive.ubuntu.com trusty/universe amd64 Packages [7589 kB]
Fetched 20.8 MB in 53s (391 kB/s)
W: Failed to fetch…

Tuan van Duong
- 185
- 4
- 14
0
votes
2 answers
Python xpath not working?
Okay, this is starting to drive me a little bit nuts. I've tried several xml/xpath libraries for Python, and can't figure out a simple way to get a stinkin' "title" element.
The latest attempt looks like this (using Amara):
def view(req, url):
…

mpen
- 272,448
- 266
- 850
- 1,236