Question: I need to process a huge XML file, 4G. I used dom4j SAX, but wrote my own DefaultElementHandler. Code framework as below:

```
SAXParserFactory sf = SAXParserFactory.newInstance();   
SAXParser sax = sf.newSAXParser();   
sax.parse("english.xml", new DefaultElementHandler("page"){   
public void processElement(Element element) { 
// process the element
}
});    

```

I thought I was processing the huge file "page" by "page". But it seems not, as I always had the outof memory error. Did I miss anything important? Thanks. I am new to XML process.

Answer: 
No you cannot. 

You need low-level services which are not standardized within programming languages. For example, you need system port and DMA IO, that basically look different on all platforms. This is usually done by inline assembly code on the lowest level, though some C++ compilers will provide you with special keywords to access CPU features such as registers and special opcodes. For instance, in MS VC++ you have \_EAX pseudo-variable to access the EAX CPU register.
Simply, yes you can.