tidy-html5/htmldoc/api/group__Tree.html

151 lines
9.9 KiB
HTML
Raw Normal View History

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.9.1"/>
<title>HTML Tidy: Document Tree</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="navtree.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="resize.js"></script>
<script type="text/javascript" src="navtreedata.js"></script>
<script type="text/javascript" src="navtree.js"></script>
<script type="text/javascript">
$(document).ready(initResizable);
$(window).load(resizeHeight);
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
<tbody>
<tr style="height: 56px;">
<td style="padding-left: 0.5em;">
<div id="projectname">HTML Tidy
&#160;<span id="projectnumber">4.9.15</span>
</div>
<div id="projectbrief">The HTACG Tidy HTML Project</div>
</td>
</tr>
</tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.9.1 -->
</div><!-- top -->
<div id="side-nav" class="ui-resizable side-nav-resizable">
<div id="nav-tree">
<div id="nav-tree-contents">
<div id="nav-sync" class="sync"></div>
</div>
</div>
<div id="splitbar" style="-moz-user-select:none;"
class="ui-resizable-handle">
</div>
</div>
<script type="text/javascript">
$(document).ready(function(){initNavTree('group__Tree.html','');});
</script>
<div id="doc-content">
<div class="header">
<div class="summary">
<a href="#func-members">Functions</a> </div>
<div class="headertitle">
<div class="title">Document Tree</div> </div>
</div><!--header-->
<div class="contents">
<table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:gac70f893c5cd5805bf76b393ad07c93c6"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gac70f893c5cd5805bf76b393ad07c93c6"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetRoot</b> (<a class="el" href="structTidyDoc.html">TidyDoc</a> tdoc)</td></tr>
<tr class="separator:gac70f893c5cd5805bf76b393ad07c93c6"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gae539f5031bd1e039458a7fffb07a2b7a"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gae539f5031bd1e039458a7fffb07a2b7a"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetHtml</b> (<a class="el" href="structTidyDoc.html">TidyDoc</a> tdoc)</td></tr>
<tr class="separator:gae539f5031bd1e039458a7fffb07a2b7a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8bc403902d8535a6dab3efc29519d970"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8bc403902d8535a6dab3efc29519d970"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetHead</b> (<a class="el" href="structTidyDoc.html">TidyDoc</a> tdoc)</td></tr>
<tr class="separator:ga8bc403902d8535a6dab3efc29519d970"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga860430a9ae7b9d347f0f7eb4204b3046"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga860430a9ae7b9d347f0f7eb4204b3046"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetBody</b> (<a class="el" href="structTidyDoc.html">TidyDoc</a> tdoc)</td></tr>
<tr class="separator:ga860430a9ae7b9d347f0f7eb4204b3046"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0da0a16a07321623bda6a02a397111ca"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0da0a16a07321623bda6a02a397111ca"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetParent</b> (<a class="el" href="structTidyNode.html">TidyNode</a> tnod)</td></tr>
<tr class="separator:ga0da0a16a07321623bda6a02a397111ca"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga0ef21eb446a56c3874a993b6f3966e73"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga0ef21eb446a56c3874a993b6f3966e73"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetChild</b> (<a class="el" href="structTidyNode.html">TidyNode</a> tnod)</td></tr>
<tr class="separator:ga0ef21eb446a56c3874a993b6f3966e73"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga60f48e1a0981ccfa027e62f73f0b1e7d"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga60f48e1a0981ccfa027e62f73f0b1e7d"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetNext</b> (<a class="el" href="structTidyNode.html">TidyNode</a> tnod)</td></tr>
<tr class="separator:ga60f48e1a0981ccfa027e62f73f0b1e7d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7a277d67c8143a8dd66d6c4796e5afa2"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7a277d67c8143a8dd66d6c4796e5afa2"></a>
<a class="el" href="structTidyNode.html">TidyNode</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyGetPrev</b> (<a class="el" href="structTidyNode.html">TidyNode</a> tnod)</td></tr>
<tr class="separator:ga7a277d67c8143a8dd66d6c4796e5afa2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga7247560b46127ac69780b938d8bca177"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga7247560b46127ac69780b938d8bca177"></a>
<a class="el" href="structTidyAttr.html">TidyAttr</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyAttrFirst</b> (<a class="el" href="structTidyNode.html">TidyNode</a> tnod)</td></tr>
<tr class="separator:ga7247560b46127ac69780b938d8bca177"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga8af1c83f5c33e767ca40561341089bae"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga8af1c83f5c33e767ca40561341089bae"></a>
<a class="el" href="structTidyAttr.html">TidyAttr</a> TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyAttrNext</b> (<a class="el" href="structTidyAttr.html">TidyAttr</a> tattr)</td></tr>
<tr class="separator:ga8af1c83f5c33e767ca40561341089bae"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ga32dff6f721a553a54cee0324cda15ba7"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="ga32dff6f721a553a54cee0324cda15ba7"></a>
ctmbstr TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyAttrName</b> (<a class="el" href="structTidyAttr.html">TidyAttr</a> tattr)</td></tr>
<tr class="separator:ga32dff6f721a553a54cee0324cda15ba7"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:gaeb8f272e8135e744b9b3f006517f1073"><td class="memItemLeft" align="right" valign="top"><a class="anchor" id="gaeb8f272e8135e744b9b3f006517f1073"></a>
ctmbstr TIDY_CALL&#160;</td><td class="memItemRight" valign="bottom"><b>tidyAttrValue</b> (<a class="el" href="structTidyAttr.html">TidyAttr</a> tattr)</td></tr>
<tr class="separator:gaeb8f272e8135e744b9b3f006517f1073"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<p>A parsed and, optionally, repaired document is represented by Tidy as a Tree, much like a W3C DOM. This tree may be traversed using these functions. The following snippet gives a basic idea how these functions can be used.</p>
<pre>
void dumpNode( TidyNode tnod, int indent )
{
<a class="el" href="structTidyNode.html">TidyNode</a> child;</pre><pre> for ( child = tidyGetChild(tnod); child; child = tidyGetNext(child) )
{
ctmbstr name;
switch ( tidyNodeGetType(child) )
{
case TidyNode_Root: name = "Root"; break;
case TidyNode_DocType: name = "DOCTYPE"; break;
case TidyNode_Comment: name = "Comment"; break;
case TidyNode_ProcIns: name = "Processing Instruction"; break;
case TidyNode_Text: name = "Text"; break;
case TidyNode_CDATA: name = "CDATA"; break;
case TidyNode_Section: name = "XML Section"; break;
case TidyNode_Asp: name = "ASP"; break;
case TidyNode_Jste: name = "JSTE"; break;
case TidyNode_Php: name = "PHP"; break;
case TidyNode_XmlDecl: name = "XML Declaration"; break;</pre><pre> case TidyNode_Start:
case TidyNode_End:
case TidyNode_StartEnd:
default:
name = tidyNodeGetName( child );
break;
}
assert( name != NULL );
printf( "\%*.*sNode: \%s\\n", indent, indent, " ", name );
dumpNode( child, indent + 4 );
}
}</pre><pre>void dumpDoc( TidyDoc tdoc )
{
dumpNode( tidyGetRoot(tdoc), 0 );
}</pre><pre>void dumpBody( TidyDoc tdoc )
{
dumpNode( tidyGetBody(tdoc), 0 );
}
</pre> </div><!-- contents -->
</div><!-- doc-content -->
<!-- start footer part -->
<div id="nav-path" class="navpath"><!-- id is needed for treeview function! -->
<ul>
<li class="footer">Generated on Fri Feb 13 2015 12:51:21 for HTML Tidy by
<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/></a> 1.8.9.1 </li>
</ul>
</div>
</body>
</html>