English 中文(简体)
XPath query with out child nodes
原标题:XPath query with out child nodes
  • 时间:2011-10-18 19:51:12
  •  标签:
  • xpath

我能否用Xpath与孩子们接触? 例如,

<parent id="10">
     <child1 id="12"/>
     <child2 id="13">
        <innerchild id="14"/>
     </child2>
</parent>

我只需要Xpath query来回像<Parent id=“10”/>

问题回答

假设整个文件都使用<代码>/ ***。 如果<代码> 则 with that id 可在任何级别上使用<代码>// 父母[@id= 10]。 认识到后一种表述在较大文件上可能会有绩效问题,因为它必须寻找整个投入树。





相关问题
VTD XML inner XPath Expressions

I have a xml file for example like this <root> <test> <bla>test1</bla> </test> <test> <bla>test2</bla> </test> <test> </test&...

C# XML adding/copying

With the following XML I am trying to copy and add to another XML but I haven t used the C# XML document objects before. So here is the XML <config> <configXML> <Connections&...

Filter SQL queries on the XML column using XPath/XQuery

I m having a table with one XML column. I d like to filter out the rows where a specific attribute in the XML match a string, essentially doing a WHERE or HAVING. The table looks something like this ...

Python XPath Result displaying only []

Hey I have just started to use Python recently and I want to use it with a bit of xPath, the thing is when I print the result of the query I only get [] and I don t know why =S import libxml2, ...

热门标签