【发布时间】:2011-02-07 01:23:01
【问题描述】:
我有下面的 XML 和下面的 ASP 语句正在工作,但我需要得到一个特定的标签而不是 response.write 一切。即我想获得“Document_Name”或“Document_Size”。
有人知道我该怎么做吗?
<PropertyImages>
<Image>
<Document_Name>tes1.png</Document_Name>
<Document_Size>123</Document_Size>
</Image>
<Image>
<Document_Name>Test.png</Document_Name>
<Document_Size>123</Document_Size>
</Image>
</PropertyImages>
这是代码..
Set objHdl = objLst.item(i)
Set PropertyImages = ObjHdl.getElementsByTagName("PropertyImages")
for x = 0 to (PropertyImages.Length-1)
Set Image = PropertyImages.item(x)
response.write "Image=" & Image.text & "<br>"
next
这似乎有效,但只带回第一个图像细节?我有许多图像需要返回特定属性。
Set images = objHdl.getElementsByTagName("Image")
For each image in images
ImageURL = image.SelectSingleNode("Image_URL").text
Next
【问题讨论】:
标签: xml asp-classic