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

  • Committer: Suren A. Chilingaryan
  • Date: 2009-09-23 17:13:04 UTC
  • Revision ID: csa@dside.dyndns.org-20090923171304-osvtr4zqb29h11kd
Intel, Tango, Phobos, and RapidXML parsers; Memory benchmark scripts

Show diffs side-by-side

added added

removed removed

Lines of Context:
4
4
 
5
5
#include "tools.h"
6
6
 
 
7
int clean = 0;
7
8
SablotSituation parser;
8
9
SDOM_Document dom;
9
10
SDOM_Document xsl;
19
20
}
20
21
 
21
22
void releaseXML(struct TestData *td) {
 
23
    if (clean) {
 
24
        SablotDestroyDocument(parser,dom);
 
25
        clean = 0;
 
26
    }
 
27
 
22
28
    SablotDestroyDocument(parser,xsl);
23
29
    SablotDestroyProcessor(processor);
24
30
    SablotDestroySituation(parser);
26
32
 
27
33
 
28
34
void parseXML(struct TestData *td, unsigned long iter) {
 
35
    if (clean) SablotDestroyDocument(parser,dom);
 
36
    else clean = 1;
 
37
    
29
38
    if (SablotParseBuffer(parser,td->xml,&dom)) {
30
39
        printf("Error parsing document!\n");
31
40
        exit(1);
43
52
//    if (iter==td->iterations) puts(result);
44
53
 
45
54
    SablotFree(result);
46
 
    SablotDestroyDocument(parser,dom);
47
55
}
48
56
 
49
 
 
50
57
int main(int argc, char *argv[]) {
51
58
    return Test(argc,argv);
52
59
}