の値を取得するためにクラシックASPを使用した:私は、次のXMLスキーマを持っているノード属性
ASPを使用して<?xml version="1.0" encoding="utf-8"?>
<PageMapping>
<Applications>
<Application name="xxx">
<Page name='Default.aspx' IsCaptured = "true" >
<Control name="btnSearch" IsCaptured = "true"/>
<Control name="btnSave" IsCaptured = "true"/>
<Control name="btnClick" IsCaptured = "true"/>
</Page>
<Page name='Login.aspx' IsCaptured = "true">
<Control name="btnSearch" IsCaptured = "true"/>
</Page>
<Page name='Home.aspx' IsCaptured = "true" >
<Control name="btnSearch" IsCaptured = "true"/>
</Page>
<Page name='User.aspx' IsCaptured = "true" />
</Application>
</Applications>
</PageMapping>
、どのように私は、「名前」と「IsCaptured」の値を取得するのでしょうか?私はあらゆる種類の方法を試みましたが、何も動作していないようです。何か案は?これらに
Set oXML = Server.CreateObject("MSXML2.DomDocument.4.0")
oXML.LoadXML(sXML) ' sXML is a variable containing the content of your XML file
For Each oNode In oXML.SelectNodes("/PageMapping/Applications/Application/Page")
sName = oNode.GetAttribute("Name")
sIsCaptured = oNode.GetAttribute("IsCaptured")
' Do something with these values here
Next
Set oXML = Nothing
我々はより多くの細部を必要とする:サーバー上でこのXMLローカルファイルのですか?それとも別のマシン/ウェブサイトにありますか? –
このXMLはローカルサーバー上にのみ存在します – subramani
だから[Rory answer](http://stackoverflow.com/a/8573002/447356)は正しいはずです。 –