xom-interest AT lists.ibiblio.org
Subject: XOM API for Processing XML with Java
List archive
[XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
- From: Cedric Coulon <coulon AT comp.nus.edu.sg>
- To: xom-interest AT lists.ibiblio.org
- Subject: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError
- Date: Mon, 19 Nov 2007 18:39:41 +0800
Hi,
I want to parse a large xml file and extract the element book. The xml source file is dblp database (dblp.xml - 411M - http://dblp.uni-trier.de/xml/).
So I use NUX and the StreamingPathFilter class. However I have an OutOfMemoryError... I don't know what I'm doing wrong.
Thanks you for your help.
Bye,
Cedric.
Here is the source of my java program:
public static void main(String[] args) {
try {
StreamingTransform myTransform = new StreamingTransform() {
public Nodes transform(Element e) {
System.out.println(XOMUtil.toPrettyXML(e));
return new Nodes();
}
};
Builder builder = new Builder(new StreamingPathFilter("/dblp/book", null).createNodeFactory(null, myTransform));
builder.build(new File("dblp.xml")); // http://dblp.uni-trier.de/xml/
} catch (Exception e) {
e.printStackTrace();
}
}
-
[XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/19/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/19/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Elliotte Harold, 11/22/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Wolfgang Hoschek, 11/22/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Steve Loughran, 11/23/2007
- Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError, Tatu Saloranta, 11/23/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Elliotte Harold, 11/22/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Cedric Coulon, 11/20/2007
-
Re: [XOM-interest] NUX, StreamingPathFilter and OutOfMemoryError,
Wolfgang Hoschek, 11/19/2007
Archive powered by MHonArc 2.6.24.