Large Document - Root Element Attribute

Hello All,

I have read many post on large file handling.Has anybody addressed following scenario?
I have a 400 MB XML file and wish to read Attribute of root element
For example

PO version=“2.0”
If I use pub.xml:getXMLNodeIterator with PO as criteria, then pub.xml:getNextXMLNode loads entire document in memory.Is there any way to query root element attribute from streamed node without loading it into memory?
I have tried pub.xml:queryXMLNode using XQL PO/@version.This works for small documents but for large document of 400 MB it hangs and crashes the server running on 2 GB memory allocation.
Appreciate help on this.

Running IS 6.1 SP2 on AIX

Thanks,
Puneet

What is the structure of your xml? Does your PO has the header & line relation ships with multiple line items repeating? If it is the case, process each line(detail) item with getXMLNodeIterator, and then call getNextXMLNode untill you process all the detail nodes.