1. A method for processing an Extensible Markup Language (XML) document, comprising: in a main thread, (a) creating a parsing thread; (b) sending an ID of next target content to be searched for in the XML document to the parsing thread, and sending a first wakeup signal to the parsing thread; in the parsing thread, (c) after receiving the first wakeup signal from the main thread, obtaining the ID of next target content send by the main thread; (d) executing an event-driven XML parsing program to parse a portion of the XML document, the XML parsing program invoking one or more callback functions when encountering one or more pre-defined events in the XML document; and (e) in response to a callback function invoked by the XML parsing program, sending target content found by the XML parsing program to the main thread, sending a second wakeup signal to the main thread, and then entering a sleep mode.