I have an application that generates an xml file on the fly. The xml strings are held in an arraylist, one line per element. When I print it out to a page, I simply get each successive line and write it to a file. I would like to be able to convert it to a graph without first having to write it to a file.
If you are looking for something elegant (and if you think your solution is going to blow out your memory) then you might consider a SequenceInputStream. I liked the idea so much I decided to write it myself. First you need this helper class:Then you use that class like this: [ April 04, 2007: Message edited by: Paul Clapham ]
Joined: Aug 16, 2005
Thank you very much. Shortly after I made the post, I tried a sequence that returned nearly 250,000 nodes. My computer didn't like that at all. I let it run for about 15 minutes to see if it could handle it before I gave up. I'll give your solution a whirl and see if it can handle the data.
I’ve looked at a lot of different solutions, and in my humble opinion Aspose is the way to go. Here’s the link: http://aspose.com