/xmlbench/trunk

To get this branch, use:
bzr branch http://darksoft.org/webbzr/xmlbench/trunk
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#include <stdio.h>
#include <sys/time.h>
#include <sstream>

#include <DOMBuilder.h>
#include <DOM/Document.h>
#include <SAX/InputSource.h>

#include "tools.h"

using namespace CSL::XML;

DOMBuilder *parser;

void initXML(struct TestData *td) {
    parser = new DOMBuilder;
//	parser->setFeature("namespaces", false);                    // turn off namespace support
//	parser->setFeature("white-space-in-element-content", true); // do not remove ignorable whitespace
}

void releaseXML(struct TestData *td) {
    delete parser;
}


void parseXML(struct TestData *td, unsigned long iter) {
    Document *doc;
    
    istringstream strm(td->xml);
    CInputSource is(&strm);
    doc=parser->parseDOMInputSource(&is);    
    doc->release();
}


int main(int argc, char *argv[]) {
    return Test(argc,argv);
}