如何访问子节点XOM中不是XML标记的节点的元素?

时间:2016-05-24 09:18:12

标签: xml xom

如何访问done节点的= child元素,如下面XOM中的代码所示?

<done>=<start></start></done>

1 个答案:

答案 0 :(得分:1)

如果您拥有done Element节点,则done.getChild(0)会为您提供Text节点,您可以调用getValue()来获取String节点= 1}}与<html> <head> <title>Welcome to Medispeak</title> <link rel=stylesheet href=Medi.css> </head> <body> <header> <div class="lang"> <form method="GET" action="?set=lang"> <input id="vlag" name="lang" class="nl" type="submit" value="1"> <input id="vlag" name="lang" class="en" type="submit" value="2"> <input id="vlag" name="lang" class="du" type="submit" value="3"> <input id="vlag" name="lang" class="es" type="submit" value="4"> <input id="vlag" name="lang" class="pt" type="submit" value="5"> <input id="vlag" name="lang" class="fr" type="submit" value="6"> </form> </div> </header> <h1>Zoeken op Medicijn</h1> <form method="post" action="tabel.php" target="Mediframe"> Voer medicijn in: <input type="text" name="zoek"> <br/> <input type="submit" value="zoeken"> <input type="reset" value="wissen"> </form> <div id="outer"> <div id="inner"> <iframe name="Mediframe" width="800" height="600" frameborder=0> </iframe> </div> </div> </body> </html>