当我在XML中有子标记时,如何检索父标记? [英] How Can I retrieve parent tag while I have a child tag in XML?

查看:43
本文介绍了当我在XML中有子标记时,如何检索父标记?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨!!!!!!!!

全部,


我在检索父节点时遇到问题。我已经有了Child节点

我正在使用Xpath。

这是我的XML ::::::

Hi!!!!!!!!
All,

I am facing a problem to retrieving parent node. I have Child node already
I am using Xpath.
Here is my XML::::::

展开 | 选择 | Wrap | 行号

推荐答案

如果< title>永远是你可以使用的第一个孩子
if <title> is always the first child you can use
展开 | 选择 | Wrap | 行号


谢谢亲爱的,但它不起作用。

它没有给我下属。

还有其他方法吗?
Thank you dear but its not working.
Its not giving me the sublings.
Is there any other way?


@Kapil Choubisa


我不知道,你做了什么,但我可以确认XPath的正确性(使用XSLT)
@Kapil Choubisa
I don?t know, what you did, but I could confirm the correctness of the XPath (using XSLT)
展开 | 选择 | Wrap | 行号


这篇关于当我在XML中有子标记时,如何检索父标记?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆