Title: Message
Hi all,
 
    Okay...I'm pretty confused at the moment... I have a potentially large xml file 40 Megs (used for importing data).  The file has the basic structure of:
<system>
    <users>
        <user1 attribute_1 attribute_2/>
        <user2 attribute_1 attribute_2/>
    </users>
    <definitions>
        <definition1 attribute_1 attribute_2/>
        <definition2 attribute_1 attribute_2/>
    </definitions>
....
</system>
 
It's pretty basic... there's just a lot of data.  Sometimes, the XML file will have a <users> node, sometimes not (the same for the definitions... there are actually a lot of second level nodes... not just the users and definitions).
 
The thought is to use Xpath to select the node (//system/users or //system/definitions).  There are times when I just want the User node or the definition node and don't want to load the entire XML document into memory (via creating a DOM).
 
I was reading about using the Dom4j's Sax Reader, but can't seem to figure out how to write the code... Any help is greatly appreciated.
 
Note: I used the code in the FAQ, but, honestly, don't really understand what it's doing... and it didn't work.
 
Thanks
Doug
 
 

Reply via email to