Re: [xml] Weird parser problem (more info)



I'd really like to help, but I don't see how I can....

Eric S. Eberhard said:
More information ... it is in the tree (prints when I dump it).

The function xmlNodeListGetString fails because the type is zero rather
than 1-20 (XML_ELEMENT_NODE thru XML_XINCLUDE_END).

If I traverse manually it finds it ...

Weirdness

What "type is zero"?  In what manner does "xmlNodeListGetString fails"?

bill bbrack work $ cat test.xml
<root><text>hello</text></root>

bill bbrack work $ xmllint --version
xmllint: using libxml version 20612-CVS2138
   compiled with: DTDValid FTP HTTP HTML C14N Catalog XPath XPointer XInclude
Iconv MemDebug Unicode Regexps Automata Schemas

bill bbrack work $ gdb xmllint
GNU gdb 6.1.1
  <snip>
(gdb) b 1075
Breakpoint 1 at 0x804ae32: file xmllint.c, line 1075.
(gdb) r
  <snip>
Breakpoint 1, parseAndPrintFile (filename=0xbffff577 "test.xml", rectxt=0x0)
    at xmllint.c:1075
1075                    doc = xmlReadFile(filename, NULL, options);
(gdb) u
1082        if (doc == NULL) {
(gdb) p *doc->children
$2 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x812609b "root",
  children = 0x8126640, last = 0x8126640, parent = 0x81264b8, next = 0x0, prev
= 0x0, doc = 0x81264b8, ns = 0x0, content = 0x0, properties = 0x0, nsDef =
0x0, psvi = 0x0, line = 1, extra = 0}
(gdb) p *doc->children->children
$3 = {_private = 0x0, type = XML_ELEMENT_NODE, name = 0x81260a0 "text",
  children = 0x81266a0, last = 0x81266a0, parent = 0x81265e0, next = 0x0, prev
= 0x0, doc = 0x81264b8, ns = 0x0, content = 0x0, properties = 0x0, nsDef =
0x0, psvi = 0x0, line = 1, extra = 0}
(gdb) p *doc->children->children->children
$4 = {_private = 0x0, type = XML_TEXT_NODE, name = 0x80eaee4 "text",
  children = 0x0, last = 0x0, parent = 0x8126640, next = 0x0, prev = 0x0,
  doc = 0x81264b8, ns = 0x0, content = 0x8126560 "hello", properties = 0x0,
  nsDef = 0x0, psvi = 0x0, line = 0, extra = 0}

At 01:22 PM 8/23/2004, Daniel Veillard wrote:
  <snip>
  Specify what doesn't work and provide a reproductible test case
please,
c.f. http://xmlsoft.org/bugs.html
Daniel

Can you "provide a reproducible test case" please?  What you have provided so
far is obviously not enough for people to attempt to solve your problem.

Bill




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