Re: [xml] python, libxml2, namespaces, and locator

On Fri, Dec 19, 2003 at 04:05:13PM -0800, Morgen Sagen wrote:
Under Python, I tried using libxml2 via the libxml2.SAXParseFile( ) 
method, but it calls only my StartElement( ) callback rather than 
StartElementNS( ).  Then I discovered the driver and got 
that to work like so...

   self.parser = xml.sax.make_parser(["drv_libxml2"])
   self.parser.setFeature(xml.sax.handler.feature_namespaces, True)

...except that it doesn't currently support setDocumentLocator.

Is there a way to enable the namespaces and namespace_prefixes features 
while using SAXParseFile( ) (or createPushParser( ), or ... )?

  Hum, that module was done by Stéphane Bidoul, I never actually looked
closely. The python SAX glue was done before I introduced SAX2 in libxml2
and wasn't updated. That part need to be improved...


Daniel Veillard      | Red Hat Network
veillard redhat com  | libxml GNOME XML XSLT toolkit | Rpmfind RPM search engine

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