/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/sun_dom2.java

  • 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:
11
11
    
12
12
    public void InitXML() {
13
13
        factory = DocumentBuilderFactory.newInstance();
 
14
        factory.setNamespaceAware(true);
 
15
        factory.setValidating(false);
 
16
 
 
17
        try {
 
18
            if (System.getenv("allow_deferring")!=null) {
 
19
                factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", true);
 
20
            } else {
 
21
                factory.setFeature("http://apache.org/xml/features/dom/defer-node-expansion", false);
 
22
            }
 
23
        } catch (Throwable err) {
 
24
            // ignoring missing option
 
25
        }
 
26
 
14
27
        try {
15
28
            parser = factory.newDocumentBuilder();
16
29
        }