/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 create/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:
129
129
        pnode.appendChild(node);
130
130
        node1=doc.createElementNS(nsopc,"Value");
131
131
        node.appendChild(node1);
132
 
        node.setAttribute("xsi:type","xsd:int");
 
132
        node1.setAttribute("xsi:type","xsd:int");
133
133
        node1.appendChild(doc.createTextNode(Integer.toString(generator.nextInt())));
134
134
    }
135
135
 
136
136
        // Use this in case of pure J2SE 1.4 used (without XML Pack - Crismon parser)
137
 
//          mem=proot.toString();
 
137
            //mem=proot.toString();
138
138
 
139
139
        // Use this in case of J2SE 1.4 + XML Pack used (Xerces parser)
140
 
//          org.apache.xerces.dom3.ls.DOMWriter dw = new org.apache.xml.serialize.XMLSerializer();
141
 
//          mem = dw.writeToString(doc);
 
140
            //org.apache.xerces.dom3.ls.DOMWriter dw = new org.apache.xml.serialize.XMLSerializer();
 
141
            //mem = dw.writeToString(doc);
142
142
 
143
143
        // Use this in case of J2SE 1.4 + Java WebService Developer Pack 1.2
144
144
            java.io.StringWriter sw = new StringWriter();
146
146
            dw.serialize(doc);
147
147
            dw.asDOMSerializer();
148
148
            mem = sw.toString();
149
 
            
150
149
        }
151
150
        catch (Exception e)
152
151
        {