/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
using System;
using System.IO;
using System.Xml;
using System.Xml.Schema;

using XMLBench;

namespace XMLBench {
 public class MonoBench : XMLBench {
    public XmlSchemaCollection xsc;
    override public void InitXML_Validation(string schema_file, string schema_location) {
	xsc = new XmlSchemaCollection();
	xsc.Add(schema_location, schema_file);
    }
    override public void ParseXML(Stream xml, int iters, int iter) {
        XmlTextReader reader = new XmlTextReader(xml);
	XmlDocument doc = new XmlDocument();
	doc.Load(reader);
    }
    override public void ValidateXML(Stream xml, int iters, int iter) {
/*
	Not available yet
	XmlReaderSettings settings = new XmlReaderSettings();
*/	
        XmlValidatingReader reader = new XmlValidatingReader(new XmlTextReader(xml));
	reader.Schemas.Add(xsc);
	XmlDocument doc = new XmlDocument();
	doc.Load(reader);
    }
 }
 
 public class Mono {
    public static void Main(string[] args) {
	XMLBench bench = new MonoBench();
	bench.Bench(args);
    }
 }
}