Re: [xml] How to Build DOM tree from sax api

Hi Daniel,

If I may piggyback on this thread for related question:

    "In libxml2, SAX2 interface and xmlTextReader interface are mutually exclusive, right?
     I mean, there's no way to hook up my own SAX2 handlers together with xmlTextReader
     in the same parse iteration, right?"

= Jatayu

On Thu, May 15, 2008 at 2:12 AM, Umesh Chandak <umeshc gslab com> wrote:
Daniel Veillard wrote:
> On Thu, May 15, 2008 at 12:28:47PM +0530, Umesh Chandak wrote:
>> Hi All,
>>      I want to build the DOM tree from sax api's of the libxml. Is there
>> any way that I can achieve this.
>> I wan to do something like this.
>> 1. I will register the sax api's first
>> 2. Once the control come the sax call back handlers . I want to build
>> the DOM tree in the call back handlers registered for sax.
>   See the SAX2 module and just call the default handlers from your
> own set of callback. See for example xmlSchemaSAXPlug() which does this.
> Of course if your callbacks have side effects on the tree building part
> you will have to check everything to garantee the tree is correct,
> Daniel
Thanks. I will check everything so that to garantee the tree is correct.
Is there any sample example present  for

xmlSchemaSAXPlug() so  that I can use  it as a reference .


xml mailing list, project page
xml gnome org

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