DEE

数据交换


[获取Element所有子节点]

<p><strong>方法签名:</strong> </p> <p><code>getAllChildOfElement(element)</code></p> <p><strong>简要描述:</strong> </p> <ul> <li>获取element的所有子节点</li> </ul> <p><strong>参数:</strong> </p> <table> <thead> <tr> <th style="text-align: left;">参数名</th> <th style="text-align: left;">必选</th> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">element</td> <td style="text-align: left;">是</td> <td style="text-align: left;">object</td> <td>Element对象</td> </tr> </tbody> </table> <p><strong>参数传入示例</strong></p> <pre><code>###### element: &amp;lt;root&amp;gt; &amp;lt;b count=2 totalCount=2&amp;gt; &amp;lt;row&amp;gt; &amp;lt;b2&amp;gt;a&amp;lt;/b2&amp;gt; &amp;lt;b1&amp;gt;1&amp;lt;/b1&amp;gt; &amp;lt;/row&amp;gt; &amp;lt;row&amp;gt; &amp;lt;b2&amp;gt;b&amp;lt;/b2&amp;gt; &amp;lt;b1&amp;gt;1&amp;lt;/b1&amp;gt; &amp;lt;/row&amp;gt; &amp;lt;/b&amp;gt; &amp;lt;/root&amp;gt;</code></pre> <p><strong>函数调用示例</strong></p> <pre><code>Element root = getRootElement(document); //获取document的根节点 if(root != null){ List&amp;lt;Element&amp;gt; chds = getAllChildOfElement(root); //获取root节点的子节点 for(Element e:chds){ if(e == null) continue; println &amp;quot;节点信息&amp;quot;+e.toString(); } } </code></pre> <p><strong>函数返回说明</strong> </p> <table> <thead> <tr> <th style="text-align: left;">类型</th> <th>说明</th> </tr> </thead> <tbody> <tr> <td style="text-align: left;">List&lt;Element&gt;</td> <td>返回节点的子节点集</td> </tr> </tbody> </table> <p><strong>返回示例</strong></p> <pre><code></code></pre> <p><strong>备注</strong> </p> <ul> <li> </li> </ul>

页面列表

ITEM_HTML