Re: [xml] Entity with elements inside it?



On Fri, Jul 10, 2009 at 08:35:42PM +0800, Bo Yang wrote:
On Fri, Jul 10, 2009 at 3:44 PM, Daniel Veillard<veillard redhat com> wrote:
On Fri, Jul 10, 2009 at 10:01:06AM +0800, Bo Yang wrote:
MiLu FLUNDER:~/win-dev/XML > xmllint --noent nstoken.xml
<?xml version="1.0"?>
<!DOCTYPE Urmel [
<!ENTITY jaja "<eins><zwei/><drei>drei</drei></eins>">
]>
<Urmel> <eins><zwei/><drei>drei</drei></eins> </Urmel>
But what I got is:

(gdb) p *child
$8 = {_private = 0x0, type = XML_ENTITY_REF_NODE, name = 0x9f83d20
"ent4", children = 0x9f7d210, last = 0x9f7d210,
  parent = 0x9f83ad0, next = 0x0, prev = 0x9f83ff0, doc = 0x9f7b450, ns = 0x0,
  content = 0x9f7d260 "<entElement domestic='Yes'>Element
data</entElement><?PItarget PIdata?>", properties = 0x0,
  nsDef = 0x0, psvi = 0x0, line = 0, extra = 0}
(gdb) p *child->children
$9 = {_private = 0x0, type = XML_ENTITY_DECL, name = 0x9f7b086 "ent4",
children = 0x0, last = 0x0, parent = 0x9f7b5a0,
  next = 0x9f7d2b0, prev = 0x9f7b740, doc = 0x9f7b450, ns = 0x9f7d078,
  content = 0x9f7d260 "<entElement domestic='Yes'>Element
data</entElement><?PItarget PIdata?>", properties = 0x47,
  nsDef = 0x1, psvi = 0x0, line = 0, extra = 0}
(gdb)

  Clearly not the same document.

I use libxml2.6.26 and libxml2.6.31, which version do you use? And my

  latest version from git , 2.7.3 based, I ran gdb on xmllint --shell


Daniel

-- 
Daniel Veillard      | libxml Gnome XML XSLT toolkit  http://xmlsoft.org/
daniel veillard com  | Rpmfind RPM search engine http://rpmfind.net/
http://veillard.com/ | virtualization library  http://libvirt.org/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]