Re: [PHP4BETA] XML DOM and top-level document constructs
| From: | Paul DuBois | Date: | Tue, 29 Feb 2000 21:19:36 +0000 |
| Subject: | Re: [PHP4BETA] XML DOM and top-level document constructs | ||
| References: | 1 2 | Groups: | php.version4 |
| Request: | Send a blank email to php-version4+get-11203@lists.php.net to get a copy of this message | ||
At 12:11 PM +0100 02-29-2000, Uwe Steinmann wrote:
On Sat, Feb 26, 2000 at 09:58:47PM -0600, Paul DuBois wrote: Paul, your error reports are great. I'll see if I can fix it. Thanks a lot. UweAfter some examination of the sources, my (very uneducated) guess is that this is occurring in the domxml_root() function. It calls docp->root, which from my understanding of the libxml documents, just returns the first child of the document object. Since that isn't necessarily an element, domxml_root() may not really be returning the document root element. Maybe the xmlDocGetRootElement() function would be more appropriate for this? -- Paul DuBois, paul@snake.netphp 4.0b4-dev I'm trying to understand how top-level constructs are handled by the DOM support for XML documents. I've modified a copy of the tests/testdom script to perform tests 1 and 2 (which generate xmldoc and xmltree structures and print them). I'm using a very simple document as a test. First document, which has a single top-level construct, the <root> element: $xmlstr = "<?xml version='1.0'?> <root> <!-- comment --> <element>Text</element> </root> ";[ more error reporting deleted ]