java - dom4j 怎样获取指定节点内部的所有内容,包含标签。
大家讲道理
大家讲道理 2017-04-17 17:58:39
0
0
365
  <select id="list" resultMap="BaseResultMap">
    select
    <include refid="Base_Column_List" />
    from loginuser

    where
    type = #{type}
    <if test='"0".equals(examine)' >
      and (examine is null or examine='0')
    </if>
    <if test='"1".equals(examine)' >
      and examine='1'
    </if>
  </select>
Element sqlElm = (Element) doc.selectSingleNode(String.format("/mapper/*[@id='%s']",sqlId));;
System.out.println(sqlElm.getData());
System.out.println(sqlElm.getText());
System.out.println(sqlElm.getDocument());
String sqlContent = sqlElm.getStringValue();

获得 id=list 的时候里面的标签都没了,我需要里面的标签怎么获得,就像jquery 里的 html() 方法一样。

大家讲道理
大家讲道理

光阴似箭催人老,日月如移越少年。

Antworte allen(0)
Beliebte Tutorials
Mehr>
Neueste Downloads
Mehr>
Web-Effekte
Quellcode der Website
Website-Materialien
Frontend-Vorlage
Über uns Haftungsausschluss Sitemap
Chinesische PHP-Website:Online-PHP-Schulung für das Gemeinwohl,Helfen Sie PHP-Lernenden, sich schnell weiterzuentwickeln!