A method, performed in a terminal, for drawing a graphical user interface GUI, comprising: receiving a drawing instruction for a GUI; determining attribute data for each of graphic elements of the GUI in a document according to the drawing instruction; and drawing the GUI according to the determined attribute data, the method characterized in that the document is a scalar vector graphics SVG document associated with the GUI, the SVG document describing, using Extensible Markup Language (XML), graphic elements of the GUI and attributes of the graphic elements; and that determining the attribute data comprises: according to a state switching instruction for switching a state of an interface element of the GUI which is issued by the interface element when an interactive event associated with the interface element happens and contained in the drawing instruction, parsing a SVG document corresponding to the interface element, the state switching instruction carrying an identification of a state of the interface element and a state value of the state, wherein the state switching instruction is not a scaling instruction; deciding, according to parsed data obtained by parsing the SVG document, whether an attribute of each of graphic elements in the SVG document is an attribute tracking the state; and when the attribute is an attribute tracking the state, determining an attribute value of the attribute corresponding to the identification and the state value of the state carried by the state switching instruction. receiving a drawing instruction for a GUI; determining attribute data for each of graphic elements of the GUI in a document according to the drawing instruction; and drawing the GUI according to the determined attribute data, the method characterized in that the document is a scalar vector graphics SVG document associated with the GUI, the SVG document describing, using Extensible Markup Language (XML), graphic elements of the GUI and attributes of the graphic elements; and that determining the attribute data comprises: according to a state switching instruction for switching a state of an interface element of the GUI which is issued by the interface element when an interactive event associated with the interface element happens and contained in the drawing instruction, parsing a SVG document corresponding to the interface element, the state switching instruction carrying an identification of a state of the interface element and a state value of the state, wherein the state switching instruction is not a scaling instruction; deciding, according to parsed data obtained by parsing the SVG document, whether an attribute of each of graphic elements in the SVG document is an attribute tracking the state; and when the attribute is an attribute tracking the state, determining an attribute value of the attribute corresponding to the identification and the state value of the state carried by the state switching instruction. according to a state switching instruction for switching a state of an interface element of the GUI which is issued by the interface element when an interactive event associated with the interface element happens and contained in the drawing instruction, parsing a SVG document corresponding to the interface element, the state switching instruction carrying an identification of a state of the interface element and a state value of the state, wherein the state switching instruction is not a scaling instruction; deciding, according to parsed data obtained by parsing the SVG document, whether an attribute of each of graphic elements in the SVG document is an attribute tracking the state; and when the attribute is an attribute tracking the state, determining an attribute value of the attribute corresponding to the identification and the state value of the state carried by the state switching instruction. <EOS>