我使用xsd.exe生成一个C#类来读/写GPX文件.如何获得生成的XML文件以包含xsi:schemaLocation属性,例如.
我想要以下但是xsi:schemaLocation总是丢失
<?xml version="1.0"?>
<gpx
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
version="1.1"
xmlns="http://www.topografix.com/GPX/1/1"
creator="ExpertGPS 1.1 - http://www.topografix.com"
xsi:schemaLocation="http://www.topografix.com/GPX/1/1 http://www.topografix.com/GPX/1/1/gpx.xsd">
</gpx>
Run Code Online (Sandbox Code Playgroud)