- XML based services integrate information resources running on different platforms or technologies to enhance the service efficiency. Thus, the volume of XML traffic on networks is increasing rapidly, and it demands for efficient XML processing algorithms to support high performance services, especially in XML security applications. This paper proposes a memory efficient XML parsing algorithm leveraging on security based heuristic and SAX (Simple API for XML) algorithm with schema validation, called Security Based Heuristic SAX (SBH-SAX), which exploits the characteristics of XML security applications and the connections between different XML processing functions. Experimental results demonstrated the overall performance improvement of XML parsing and XML security processing using SBH-SAX. Comparing to SAX based processing and DOM based processing, system with SBH-SAX requires the least memory usage in most security processing cases, and also performs twice faster in processing.