📄 xml-dom.html
字号:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"><html><head><meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1"><title>Qt Toolkit - The Qt DOM classes</title><style type="text/css"><!--h3.fn,span.fn { margin-left: 1cm; text-indent: -1cm; }a:link { color: #004faf; text-decoration: none }a:visited { color: #672967; text-decoration: none }body { background: white; color: black; }--></style></head><body bgcolor="#ffffff"><p><table width="100%"><tr><td><a href="index.html"><img width="100" height="100" src="qtlogo.png"alt="Home" border="0"><img width="100"height="100" src="face.png" alt="Home" border="0"></a><td valign="top"><div align="right"><img src="dochead.png" width="472" height="27"><br><a href="classes.html"><b>Classes</b></a>- <a href="annotated.html">Annotated</a>- <a href="hierarchy.html">Tree</a>- <a href="functions.html">Functions</a>- <a href="index.html">Home</a>- <a href="topicals.html"><b>Structure</b> <font face="Arial,Helvetica,Geneva,Swiss,SunSans-Regular" align="center" size=32>Qte</font></a></div></table><h1 align="center"> The Qt DOM classes</h1><br clear="all"><p><h2><a name="introDOM">Introduction to DOM</a></h2><p>DOM provides an interface to access and change the content and structure ofan XML file. It makes a hierarchical view of the document (tree) available with the root element of the XML file serving as its root. Thus -- in contrast to the SAX2 interface -- an object model of the document is resident in memory after parsing which makes manipulation easy. <p>In the Qt implementation of the DOM allnodes in the document tree are subclasses of <a href="qdomnode.html">QDomNode</a>.The document itself is represented as a <a href="qdomdocument.html">QDomDocument</a> object.<p>The following table lists the available node classes and their potential children classes.<table><tr> <th align="left">Node type</th> <th align="left">Possible children</th></tr><tr> <td><a href="qdomdocument.html">QDomDocument</a> </td> <td><a href="qdomelement.html">QDomElement</a> (maximum one), <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomdocumenttype.html">QDomDocumentType</a> </td></tr><tr> <td><a href="qdomdocumentfragment.html">QDomDocumentFragment</a> </td> <td><a href="qdomelement.html">QDomElement</a>, <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomtext.html">QDomText</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, <a href="qdomentityreference.html">QDomEntityReference</a> </td></tr><tr><td><a href="qdomdocumenttype.html">QDomDocumentType</a> </td> <td>no children </td></tr><tr><td><a href="qdomentityreference.html">QDomEntityReference</a> </td> <td><a href="qdomelement.html">QDomElement</a>, <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomtext.html">QDomText</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, <a href="qdomentityreference.html">QDomEntityReference</a> </td></tr><tr><td><a href="qdomelement.html">QDomElement</a> </td> <td><a href="qdomelement.html">QDomElement</a>, <a href="qdomtext.html">QDomText</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, <a href="qdomentityreference.html">QDomEntityReference</a> </td></tr><tr><td><a href="qdomattr.html">QDomAttr</a> </td> <td><a href="qdomtext.html">QDomText</a>, <a href="qdomentityreference.html">QDomEntityReference</a> </td></tr><tr><td><a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a> </td> <td>no children </td></tr><tr><td><a href="qdomcomment.html">QDomComment</a> </td> <td>no children </td></tr><tr><td><a href="qdomtext.html">QDomText</a> </td> <td>no children </td></tr><tr><td><a href="qdomcdatasection.html">QDomCDATASection</a> </td> <td>no children </td></tr><tr><td><a href="qdomentity.html">QDomEntity</a> </td> <td><a href="qdomelement.html">QDomElement</a>, <a href="qdomprocessinginstruction.html">QDomProcessingInstruction</a>, <a href="qdomcomment.html">QDomComment</a>, <a href="qdomtext.html">QDomText</a>, <a href="qdomcdatasection.html">QDomCDATASection</a>, <a href="qdomentityreference.html">QDomEntityReference</a> </td></tr><tr><td><a href="qdomnotation.html">QDomNotation</a> </td> <td>no children </td></tr></table><p>With <a href="qdomnodelist.html">QDomNodeList</a> and <a href="qdomnamednodemap.html">QDomNamedNodeMap</a> two collection classes are provided: <a href="qdomnodelist.html">QDomNodeList</a> is a list of nodeswhereas <a href="qdomnamednodemap.html">QDomNamedNodeMap</a> is used to handle unordered sets of nodes(often used for attributes).<p>The <a href="qdomimplementation.html">QDomImplementation</a> class allows the user to query features of theDOM implementation.<p><h2>Further reading</h2><p>To get started please refer to the <a href="qdomdocument.html">QDomDocument</a> documentation thatdescribes basic usage.<p>More information about Qt and XML can be found in the <a href="xml.html">introduction to the Qt XML module.</a><p><address><hr><div align="center"><table width="100%" cellspacing="0" border="0"><tr><td>Copyright
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -