/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/expat-sablotron-dom.cpp

  • 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 <sablot.h>
 
4
 
 
5
#include "tools.h"
 
6
 
 
7
SablotSituation parser;
 
8
SDOM_Document dom;
 
9
 
 
10
void initXML(struct TestData *td) {
 
11
    SablotCreateSituation(&parser);
 
12
}
 
13
 
 
14
void releaseXML(struct TestData *td) {
 
15
    SablotDestroySituation(parser);
 
16
}
 
17
 
 
18
 
 
19
void parseXML(struct TestData *td, unsigned long iter) {
 
20
    if (SablotParseBuffer(parser,td->xml,&dom)) {
 
21
        printf("Error parsing document!\n");
 
22
        exit(1);
 
23
    }
 
24
 
 
25
    SablotDestroyDocument(parser,dom);
 
26
}
 
27
 
 
28
 
 
29
int main(int argc, char *argv[]) {
 
30
    return Test(argc,argv);
 
31
}