我需要使用C#类(XmlDocument或XDocument)生成一个XML文件,根元素如下所示:
<ns1:ConsultaSeqRps xmlns:ns1="http://localhost:8080/WsNFe2/lote"
xmlns:tipos="http://localhost:8080/WsNFe2/tp"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://localhost:8080/WsNFe2/lote http://localhost:8080/WsNFe2/xsd/ConsultaSeqRps.xsd">
我尝试过使用setAttribute和XmlNamespaceManager的不同替代方法,但都没有成功。