过去几天我一直坚持这一点。确切的问题是:
“使用Ajax编写一个允许用户输入项目名称的应用程序(从上面的XML中显示相关消息,如果在文档中找到,则显示有关项目数量的信息”
XML文件:
<?xml version="1.0" encoding="UTF-8"?>
<Recipe>
<Name>Lime Jello Marshmellow Cottage Cheese Suprise</Name>
<Description>My grandma's favourite (may she rest in peace).</Description>
<Ingredients>
<Ingredient>
<Qty unit="box">1</Qty>
<Item>Lime Gelatin</Item>
</Ingredient>
<Ingredient>
<Qty unit="g">500</Qty>
<Item>Multi Coloured tiny marshmallows</Item>
</Ingredient>
<Ingredient>
<Qty unit="ml">500</Qty>
<Item>Cottage Cheese</Item>
</Ingredient>
<Ingredient>
<Qty unit="dash"/>
<Item optional="1">Tabasco sauce</Item>
</Ingredient>
</Ingredients>
<Instruction>
<step>Prepare line gelatin according to package instructions</step>
</Instruction>
</Recipe>