Sign In/My Account | View Cart  
advertisement

Article:
 XML Namespace Processing in Apache
Subject: The Basic API
Date: 2010-07-26 01:59:51
From: johnsoncraig

I have searched here the basic of API and include it to my project as a <font color="black">writer job</font> (http://www.prospectsolution.com/) .


The basic approach is that any module may register itself as a handler for a namespace by implementing a struct xmlns and registering it as a handler for xmlns:


#include "xmlns.h"


static const char* MYNAMESPACE = "http://example.com/my-namespace#" ;


static xmlns my_namespace = {
....
} ;
ap_register_provider(pool, "xmlns", MYNAMESPACE, version, &my_namespace) ;


The xmlns struct comprises a subset of SAX2 callbacks, which will be called at every event in the namespace we registered for. In addition, a namespace handler may register to process comments: this is an extension designed for the benefit of hybrid namespace/comment processors such as ESI, and also enables SSI to be implemented easily both as a namespace and a comment processor.


Previous Message Previous Message   Next Message Next Message


Sponsored By: