Re: [xml] document URI?



On Fri, Mar 05, 2010 at 09:07:04AM -0500, Ethan Tira-Thompson wrote:
For error reporting, I would like to log the filename in which an error occurred.

It seems xmlNodeGetBase(node->doc,node) has the filename.  However, the documentation for this function:
    http://xmlsoft.org/html/libxml-tree.html#xmlNodeGetBase
references a xmlDocumentGetBase() that I cannot find anywhere.

So my questions:

1. Is xmlNodeGetBase() what I should be calling?  (i.e. Is this "base URL" a fancy way of saying the path 
the data is being loaded from, or does it have connotations with XML namespaces or some such)

  If your docuemnt results from XInclude that function allows to track
the real source document, not the including one

2. Is this simply a more portable wrapper for accessing doc->URL?

  no but without XInclude, doc->URL is just fine

3. Is xmlDocumentGetBase a bug in the documentation?

  yeah, doc->URL

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]