Xml 急需XPATH表达式帮助 `在这里输入代码` 蒂鲁帕特,学院南门 +91 901285479 伊塔兰 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 印度的 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 蒂鲁帕特,学院南门 +91 901285479 南非人 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 加纳人 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250

Xml 急需XPATH表达式帮助 `在这里输入代码` 蒂鲁帕特,学院南门 +91 901285479 伊塔兰 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 印度的 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 蒂鲁帕特,学院南门 +91 901285479 南非人 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250 加纳人 Rs200 完整的英式早餐包括培根、煎蛋、香肠、蘑菇、烤豆、吐司、烤西红柿,还有茶或咖啡 250,xml,xpath,xml-parsing,Xml,Xpath,Xml Parsing,我对XML和XPATH表达式非常陌生,我编写了这段代码,我正在尝试使用x-path表达式获取所有具有意大利食物类型的餐厅。 请帮助我,如果我违反了任何规则,请原谅我,因为我也是这个平台的新手。 下面是代码最好按照以下内容使用一致的餐厅元素: <?xml version="1.0" encoding="UTF-8"?> <Restaurants>`enter code here` <Restaurant1 Name = &quo

我对XML和XPATH表达式非常陌生,我编写了这段代码,我正在尝试使用x-path表达式获取所有具有意大利食物类型的餐厅。 请帮助我,如果我违反了任何规则,请原谅我,因为我也是这个平台的新手。
下面是代码

最好按照以下内容使用一致的餐厅元素:

<?xml version="1.0" encoding="UTF-8"?>
<Restaurants>`enter code here`
<Restaurant1 Name = "Sir Martin Food">
      <Address>Tirupattir, College South Gate</Address>
      <Phone_Number>+91 901285479</Phone_Number>
      <Cuisine>
            <Breakfast_Menu>
                  <Food_Type>Italain</Food_Type>
                  <Price>Rs200</Price>
                  <Description>The full English breakfast consists of bacon, fried egg, sausage, mushrooms, baked beans, toast, grilled tomatoes, and accompanied with tea or coffee</Description>
                  <Calories>250</Calories>
                 <Food_Type>Indian</Food_Type>
                  <Price>Rs200</Price>
                  <Description>The full English breakfast consists of bacon, fried egg, sausage, mushrooms, baked beans, toast, grilled tomatoes, and accompanied with tea or coffee</Description>
                  <Calories>250</Calories>
            </Breakfast_Menu>
      </Cuisine>
</Restaurant1>
<Restaurant2 Name = "Son Continental">
      <Address>Tirupattir, College South Gate</Address>
      <Phone_Number>+91 901285479</Phone_Number>
      <Cuisine>
            <Breakfast_Menu>
                  <Food_Type>South African</Food_Type>
                  <Price>Rs200</Price>
                  <Description>The full English breakfast consists of bacon, fried egg, sausage, mushrooms, baked beans, toast, grilled tomatoes, and accompanied with tea or coffee</Description>
                  <Calories>250</Calories>
                 <Food_Type>Ghanaian</Food_Type>
                  <Price>Rs200</Price>
                  <Description>The full English breakfast consists of bacon, fried egg, sausage, mushrooms, baked beans, toast, grilled tomatoes, and accompanied with tea or coffee</Description>
                  <Calories>250</Calories>
            </Breakfast_Menu>
      </Cuisine>
</Restaurant2>
</Restaurants>

谢谢,先生,请问我可以在一个标签中有多个属性吗?比如说@YawAmoahAdum Attah,一个元素可以有多个属性,并且它们的名称应该是唯一的。这个问题没有显示任何最小的研究工作。您应该至少发布您正在尝试开始的x路径表达式的建议。然后,有人可能会指出您建议的表达式中缺少的元素或问题。
<Restaurant id="1"..
/Restaurants/*[Cuisine/Breakfast_Menu/Food_Type="Italain"]/Phone_Number