Re: [xml] Namespaces from SAX



On Fri, 11 May 2001, Daniel Veillard wrote:

On Fri, May 11, 2001 at 12:50:54PM +0100, Matt Sergeant wrote:
The libxml2 SAX parser seems to be just SAX1. I can't seem to find a
simple way of doing namespace mapping from the startElement callbacks. Is
there one that I'm missing?

  Right I sync'ed with an earliy release of expat, and didn't tried
to follow SAX evolution. What's missing? For the moment all namespace
information are kept in the DOM tree so it's s significant change probably.

Well actually the implementation is far closer to expat than to SAX. I
guess to get there you'd need to go to libxml3... It would take me way too
long to go into the details, I'm afraid. But basically, startElement would
recieve a single object which would have attributes "Name, Namespace,
Prefix, Attributes", and each attribute would have "Name, Value,
Namespace, Prefix". At least I think that's how it goes - I'm just taking
this from my knowledge of PerlSAX2.

-- 
<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]