XSD.EXE和GPX XSD文件:向后兼容性读取 [英] XSD.EXE and GPX XSD files : Backward compatibility reading
问题描述
您好,
我使用XSD.EXE使用此模式为GPX 1.1文件生成C#解析器:
http://www.topografix.com/GPX/1/1/gpx.xsd
它工作得很好......但是,它无法读取GPX 1.0 XML文件!!!
< br>我需要手动编辑我的XML文件进行更改:
xmlns =" http://www.topografix.com/GPX/1/1"
to xmlns =" http://www.topografix.com/GPX/1/0"
如何避免这种情况?
我确信有一些改变 http://www.topografix.com/GPX/1/1/gpx.xsd使其向后兼容GPX 1.0 ...
非常感谢!
Hi,
I have used XSD.EXE to generate a C# parser for GPX 1.1 file using this schema:
http://www.topografix.com/GPX/1/1/gpx.xsd
It works great... However, it can't read GPX 1.0 XML files !!!
I need to edit manually my XML file to change:
xmlns="http://www.topografix.com/GPX/1/1"
to
xmlns="http://www.topografix.com/GPX/1/0"
How can I avoid this ?
I'm sure there is something to change in http://www.topografix.com/GPX/1/1/gpx.xsd to make it backward compatible with GPX 1.0...
Thanks a lot !
推荐答案
我不熟悉GPX,但是如果有不同的版本,并且那些不同的版本使用不同的命名空间,那么这种区别是有原因的。简单地更改命名空间通常不足以应对版本差异。
是否存在GPX版本的架构1.0文件?如果是这样,为什么不使用它来为该版本生成类?在我看来好像 http://www.topografix.com/GPX/1/0/gpx.xsd 是版本1.0架构。
Isn't there a schema for GPX version 1.0 documents? If so why don't you use it to generate classes for that version? It looks to me as if http://www.topografix.com/GPX/1/0/gpx.xsd is the version 1.0 schema.
这篇关于XSD.EXE和GPX XSD文件:向后兼容性读取的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!