<分区>
如果有,那么 xml 与语言的集成有多深?哪些原语用于操作 xml 文档?
附言。我对 SQL、XPath、XSLT 等声明性语言不感兴趣 :)
<分区>
如果有,那么 xml 与语言的集成有多深?哪些原语用于操作 xml 文档?
附言。我对 SQL、XPath、XSLT 等声明性语言不感兴趣 :)
最佳答案
VB.NET 9.0 有 XML literals这似乎是你在找什么。 此示例取自 Imran Shaik blog
<WebMethod()> _
Public Function AllCountriesUsingXMLLiterals() As String
Dim sud As New CountryDataSetTableAdapters.CountryTableTableAdapter
Dim XDataSet As New CountryDataSet.CountryTableDataTable
sud.Fill(XDataSet)
Dim XDoc = _
<Countries xmlns="http://tempuri.org/Schema/Countries">
<%= From country In XDataSet Select <Country Code=<%= country.CountryISO %> Name=<%= country.CountryName %>/> %>
</Countries>
Return XDoc.ToString
End Function
关于xml - 有没有原生支持 xml 的编程语言?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/1017072/