本文介绍了获取XML中项目的路径的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 大家好, i有一个小问题,但我无法解决这个问题.. 我有一个xml文件,如果用户要求编程搜索xml中的某个值,它可以找到它并获取到这个地方的路径,在那里我们可以找到搜索值。 示例.. 。 i有这个xml文件,我想在卡路里节点找到值650,最后我想得到路径,我可以找到这个值... breakfast_menu / food / calories Hi guys,i have one little problem, but i can´t solve this ..I have one xml file, and if user ask to program for search some value in xml, it can find it and get path to this place, where we can find searching value.Example ...i have this one xml file and i want find value 650 in calories node, and finally i want get path where i can find this value ... breakfast_menu/food/calories<breakfast_menu> <food> <name>SKUSAM NIECO NOVE</name> <price>$5.95</price> <description>two of our famous Belgian Waffles with plenty of real maple syrup</description> <calories>650</calories> </food> <food> <name>Strawberry Belgian Waffles</name> <price>$7.95</price> <description>light Belgian waffles covered with strawberries and whipped cream</description> <calories>900</calories> </food> <food> <name>Berry-Berry Belgian Waffles</name> <price>$8.95</price> <description>light Belgian waffles covered with an assortment of fresh berries and whipped cream</description> <calories>900</calories> </food> <food> <name>French Toast</name> <price>$4.50</price> <description>thick slices made from our homemade sourdough bread</description> <calories>600</calories> </food></breakfast_menu> 有人可以帮我解决这个问题吗?或者更好的方式,有人持有源吗?Could somebody help me how can i solve this please? or in better way, could somebody hold source?推荐答案 这篇关于获取XML中项目的路径的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持! 09-18 04:55