我同样认为,在一机内显示一种装有XSLT档案的原始XML文档格式。 实际显示的XML文档是变数,取决于用户从一种形式选择(XML文档地址在控制器中确定)。
Is it possible to return the XML information directly from my controller, and if so, how? My main consideration is how to use an iframe in my view and have the id updated by my AJAX form. Initially, my controller action merely returned a string representing the XML file address, but I had trouble manipulating my JavaScript to accept this return value and parse it into document.getElementById.src = url
.
现行法典:
Dim docXML As New XmlDocument()
docXML.Load("C:SharpSVN" + cprotocols + "_Config.xml")
Using nodeReader = New XmlNodeReader(docXML)
nodeReader.MoveToContent()
Dim xRoot As XElement = XElement.Load(nodeReader)
Return xRoot.ToString()
End Using
这是没有XSLT和x的。 Root
也只将数据按一行(我希望看到元件和与空间的正确格式)重新列报。