/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk

« back to all changes in this revision

Viewing changes to parse/libxml-dom.c

  • Committer: Suren A. Chilingaryan
  • Date: 2009-02-16 09:27:17 UTC
  • Revision ID: csa@dside.dyndns.org-20090216092717-wipyvaaw2srxhgns
Initial import

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#include <stdio.h>
 
2
#include <sys/time.h>
 
3
#include <gdome.h>
 
4
 
 
5
#include "tools.h"
 
6
 
 
7
GdomeDOMImplementation *di;
 
8
 
 
9
void initXML(struct TestData *td) {
 
10
    di=gdome_di_mkref();
 
11
}
 
12
 
 
13
void releaseXML(struct TestData *td) {
 
14
    GdomeException exc;
 
15
    gdome_di_unref(di,&exc);
 
16
}
 
17
 
 
18
void parseXML(struct TestData *td, unsigned long iter) {
 
19
    GdomeDocument *doc;
 
20
    GdomeException exc;
 
21
 
 
22
    doc = gdome_di_createDocFromMemory(di,td->xml,GDOME_LOAD_PARSING,&exc);
 
23
    if (!doc) {
 
24
        printf("Error parsing document: %d!\n",exc);
 
25
        exit(0);
 
26
    }
 
27
 
 
28
    gdome_di_freeDoc(di,doc,&exc);
 
29
}
 
30
 
 
31
int main(int argc, char *argv[]) {
 
32
    return Test(argc,argv);
 
33
}