Skip to Content.
Sympa Menu

xom-interest - [XOM-interest] Large xml file

xom-interest AT lists.ibiblio.org

Subject: XOM API for Processing XML with Java

List archive

Chronological Thread  
  • From: Bruno Oliveira <bruno.oliveira360 AT gmail.com>
  • To: xom-interest AT lists.ibiblio.org
  • Subject: [XOM-interest] Large xml file
  • Date: Wed, 23 Sep 2009 13:35:46 +0100

Hello, I am a little noob with xom, and i am trying to split a large xml
file in several files, but i have a problem, I have a large xml file, and ,
for example, if i want to split this file in two , the program needs 30
minutes to do this. What is the most efficiency way to read xml files and
acess to the nood childs? I am using this procedure:

Builder builder = new Builder();
Document doc = builder.build("SalesOrderDetail.xml");
rooter = doc.getRootElement();
entries = rooter.getChildElements();

for (int y = 0; y < entries.size(); y++) {

Element element = entries.get(z);
System.out.println(element.getLocalName());

Elements childs = element.getChildElements();
for (int j = 0; j < childs.size(); j++) {
Element childx = childs.get(j);
System.out.println(childx.getLocalName());
}
}

....

Best regards,
Bruno Oliveira




Archive powered by MHonArc 2.6.24.

Top of Page