gm7*_*m77 7 .net xml vb.net xmlwriter xml-namespaces
我不确定如何搜索谷歌,但xmlns元素的问题在XML文件中是否重要?我在ASP.NET(VB)中使用XMLWriter创建XML文件,我试图匹配我提供的示例.
<ns2:SubmitSMReq xmlns:ns4="http://schemas.xmlsoap.org/soap/envelope/" xmlns:ns3="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:ns2="http://somesite/schema">
Run Code Online (Sandbox Code Playgroud)
这是我在我的vb文件中的内容:
writer.WriteStartElement("ns2", "SubmitSMReq", "http://schemas.xmlsoap.org/soap/envelope/")
writer.WriteAttributeString("xmlns", "ns3", Nothing, "http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4")
writer.WriteAttributeString("xmlns", "ns4", Nothing, "http://somesite/schema")
Run Code Online (Sandbox Code Playgroud)
但它以不同的方式生成XML.
<ns2:SubmitSMReq xmlns:ns3="http://www.3gpp.org/ftp/Specs/archive/23_series/23.140/schema/REL-6-MM7-1-4" xmlns:ns4="http://somesite/schema" xmlns:ns2="http://schemas.xmlsoap.org/soap/envelope/">
Run Code Online (Sandbox Code Playgroud)
我意识到提供的示例中的xmlns有不同的"ns"(名称空间?)"数字.这些事情中的任何一个都重要吗?我的文件应该没问题吗?
谢谢
| 归档时间: |
|
| 查看次数: |
1961 次 |
| 最近记录: |