[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]
Re: [xml] libxml2 review in windows::developer
- From: Daniel Veillard <veillard redhat com>
- To: Peter Jacobi <pj walter-graphtek com>
- Cc: xml gnome org
- Subject: Re: [xml] libxml2 review in windows::developer
- Date: Fri, 11 Apr 2003 06:57:57 -0400
On Fri, Apr 11, 2003 at 12:49:27PM +0200, Peter Jacobi wrote:
> Hi Daniel,
>
> I wanted only to report this as a good news/bad news factoid:
Yeah, I wasn't negative about the posting more about the fact that
they apparently didn't tried to use libxml directly, i.e. they didn't
bothered looking at the native APIs
> good news: libmxml is considered mainstream, even on Win32
> bad news: rather weak comparative benchmark doesn't give real information.
yep,
> > Not much to me because I don't know what they benchmarked.
>
> Reading the file into a tree, walking the tree, thawing objects:
>
> void read_file(char const *input_name, FILE *output)
> {
> using xmlpp::DomParser;
> using xmlpp::Node;
> using xmlpp::Attribute;
>
> DomParser parser(input_name);
> Node *root = parser.get_root_node();
> Node::NodeList children = root->children("entry");
you see, for me it's very hard to map that to the associated calls
in libxml2, I can't even tell where the document is actually parsed,
nor what root->children("entry"); actually does, is taht a call to XPath ?
or a direct walk of the children nodes, or ...
> Node::NodeList::const_iterator begin = children.begin();
> Node::NodeList::const_iterator end = children.end();
>
> for(int i = 0; begin != end; ++begin, ++i)
> {
> Node const *node = *begin;
> Attribute const *year = node->attribute("year");
> Attribute const *month = node->attribute("month");
> Attribute const *day = node->attribute("day");
> Attribute const *who = node->attribute("who");
> Entry entry(year->value(),
> month->value(),
> day->value(),
> who->value());
I can think of ways to significantly speed up attribute value
lookup in the general case too..
ATM I'm working on features, maybe I will have time to do some
speedup work before the summer..
--
Daniel Veillard | Red Hat Network https://rhn.redhat.com/
veillard redhat com | libxml GNOME XML XSLT toolkit http://xmlsoft.org/
http://veillard.com/ | Rpmfind RPM search engine http://rpmfind.net/
[Date Prev][Date Next] [Thread Prev][Thread Next]
[Thread Index]
[Date Index]
[Author Index]