objectify.fromstring using parser from objectify.makeparser does not produce objectified objects
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
lxml |
New
|
Undecided
|
Unassigned |
Bug Description
In the docs:
```
>>> root = objectify.
>>> print(isinstanc
True
```
Works as above for me.
But when I use a parser it no longer works:
```
schema = etree.XMLSchema
parser = objectify.
In [56]: root = objectify.
In [57]: isinstance(root, objectify.
Out[57]: False
```
I don't see this mentioned in the docs and I would expect `objectify.
Python : sys.version_
lxml.etree : (3, 4, 1, 0)
libxml used : (2, 9, 0)
libxml compiled : (2, 9, 0)
libxslt used : (1, 1, 28)
libxslt compiled : (1, 1, 28)
Furthermore, there is this example in the docs, which doesn't work:
``` test</b> </a>" fromstring( xml, parser)
>>> xml = "<a><b>
>>> a = objectify.
>>> print(a.b)
test
```
when I try it:
``` test</b> </a>"
In [65]: xml = "<a><b>
In [66]: a = objectify. fromstring( xml, parser=p)
In [67]: a.b ------- ------- ------- ------- ------- ------- ------- ------- ------- ----- input-67- 8c3e650d746c> in <module>()
-------
AttributeError Traceback (most recent call last)
<ipython-
----> 1 a.b
AttributeError: 'lxml.etree. _Element' object has no attribute 'b'
```
...because it is not returning objectified elements