【发布时间】:2010-05-26 20:26:52
【问题描述】:
以下 XML 是通过序列化 .Net 对象生成的:
<?xml version="1.0" encoding="utf-8"?>
<Request xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://EPS.WebServices/WebServiceSchema" >
<Method xmlns="http://EPS.Library/RequestSchema">PackPlacementUpdate</Method>
<Type xmlns="http://EPS.Library/RequestSchema">PackPlacementUpdate</Type>
</Request>
我正在使用 XSD 生成架构。但是,(我认为)因为有多个命名空间,所以会生成两个不同的模式文件。我们将在外部提供 XSD 文件,我担心这两个文件会引起混淆。
在不更改 .Net 类的命名空间的情况下,有没有一种方法可以创建一个 XSD 架构文件而不是两个?
谢谢。
【问题讨论】:
标签: .net xml serialization xsd