1. A method for processing an Extensible Markup Language (XML) document, comprising: in a main thread, (a) creating a parsing thread by the main thread, the parsing thread directly controlled by the main thread; (b) sending an ID of next target content to be searched for in the XML document directly to a message queue of 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 sent by the main thread directly to the message queue of the parsing 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 directly to a message queue of the main thread, sending a second wakeup signal to the main thread, and then entering a sleep mode.