私のアプリケーションには、次のような出力を持つWebサービスからのこのxmlデータがあります。
<?xml version="1.0" encoding="UTF-8"?>
-<NewDataSet>
-<Table>
<RecipeID>12923</RecipeID>
<RecipeNumber>R-000023</RecipeNumber>
<Name>Orange Pineapple Honey chicken (2)</Name>
<Servings>4</Servings>
<PrepTime>20</PrepTime>
<CookTime>90</CookTime>
<MarinateTime>0</MarinateTime>
<StandTime>0</StandTime>
<ChillTime>0</ChillTime>
<BrewTime>0</BrewTime>
<FreezeTime>0</FreezeTime>
<TotalTime>110</TotalTime>
<MethodHeader>Makes 4 servings</MethodHeader>
<SubTitle>Tasty variation of the delicious honey chicken with an orange pineapple sauce.
</Table>
-<Table1>
<Description>3 lbs. skinless boneless chicken breast halves</Description>
</Table1>
-<Table1>
<Description>2 Tbsp. salt</Description>
</Table1>
-<Table2>
<Note>Preheat oven to 350°F. Thoroughly wash chicken breasts and add salt.</Note>
</Table2>
-<Table2>
<Note>Place the salted chicken breasts in a large baking dish and set them aside. To make the sauce, combine the honey and the pineapple juice.</Note>
</table2>
</NewDataSet>
そのため、ReadXml を使用してデータセットに入れ
<%#Eval("RecipeID")%>
、マスターページのソースなどで inside を使用して DataList に情報を表示しました。
問題は、 に到達したとき<table1>
です。複数のノード (鶏肉と塩) を取得できません。この 2 つのノードを取得するにはどうすればよいですか。<table2>
同じことを行い、2 つの<note>
ノードを取得します。