Re: [xml] setting base for non-file parsing



On Wed, 14 Nov 2001, Daniel Veillard wrote:

On Wed, Nov 14, 2001 at 04:47:43PM +0000, Matt Sergeant wrote:
Daniel et al,

How do I set the Base directory before parsing a string or stream? Can I
do that in the ParserCtxt?

  Hum, the URL of the document node is inherited from the
one of the parser input stream. A string or a stream don't have
one. ctxt->input->filename is the place where the input filename
is stored, ad that's what get copied in doc->URL which gives
the base of the document.

Funny I found ctxt->directory worked. *shrug* :-)

-- 
<Matt/>

    /||    ** Founder and CTO  **  **   http://axkit.com/     **
   //||    **  AxKit.com Ltd   **  ** XML Application Serving **
  // ||    ** http://axkit.org **  ** XSLT, XPathScript, XSP  **
 // \\| // ** mod_perl news and resources: http://take23.org  **
     \\//
     //\\
    //  \\




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