Re: [xml] DOM parser uses SAX2

2019-11-11 Thread Akash Opensource via xml
Hi Nick ,

Thank you very much for your explanation.It really helps.

>From test file I meant sample *.xml file that can be used to go for
statement coverage.

For example I got a *.xml file in test folder of libxml2 extracted source
directory that contained a long element name more than 4000 characters and
it was possible for me to hit a debug point related to such a large element
name handling.
Similarly xml files with utf8 and utf16 helped in covering encoding related
if conditions in encoding.c source file.

Thanks & Regards,
Akash



On Mon, Nov 11, 2019, 6:49 PM Nick Wellnhofer  On 11/11/2019 11:21, Akash Opensource via xml wrote:
> > But while checking libxml2 code I saw the DOM parser making calls to
> functions
> > in sax2.c .
>
> The event-based SAX parser is used to build a DOM tree. There's nothing
> special about that, just like you could walk a DOM tree to generate SAX
> events.
>
> > Also tell me is there a way to get statement coverage for all the path
> in
> > libxml2 source files.
>
> You can get coverage reports with the usual compiler options and tools.
>
> > Can I get more test files ?
>
> What do you mean by "more test files"?
>
> Nick
>
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


Re: [xml] DOM parser uses SAX2

2019-11-11 Thread Nick Wellnhofer

On 11/11/2019 11:21, Akash Opensource via xml wrote:
But while checking libxml2 code I saw the DOM parser making calls to functions 
in sax2.c .


The event-based SAX parser is used to build a DOM tree. There's nothing 
special about that, just like you could walk a DOM tree to generate SAX events.


Also tell me is there a way to get statement coverage for all the path in 
libxml2 source files.


You can get coverage reports with the usual compiler options and tools.


Can I get more test files ?


What do you mean by "more test files"?

Nick
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml


[xml] DOM parser uses SAX2

2019-11-11 Thread Akash Opensource via xml
Hi All,

I have a doubt regarding libxml2 .

As I was reading info on XML parsers, I got to know two types DOM and SAX .
DOM needs more memory to build the complete DOM tree. However SAX does
partial incremental parsing and consumes less memory.

But while checking libxml2 code I saw the DOM parser making calls to
functions in sax2.c .

So I am wondering why and how DOM can use SAX ?
Are they not completely different ?

Also tell me is there a way to get statement coverage for all the path in
libxml2 source files. Can I get more test files ?

Thanks & Regards
Akash
___
xml mailing list, project page  http://xmlsoft.org/
xml@gnome.org
https://mail.gnome.org/mailman/listinfo/xml