EDN Admin
Well-known member
I am trying to generate XML with multiple namespaces. Its KML, beloved of Google Earth, and Im using elements from the gx: extension.
Google Earth (http://code.google.com/apis/kml/documentation/kmlreference.html#kmlextensions) advises I need to start with:
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2
When I use
<System.Xml.Serialization.XmlRoot("kml", Namespace:="http://earth.google.com/kml/2.0", IsNullable:=False)> _<br/>
Public Class kmlType
I get:
<kml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://earth.google.com/kml/2.0
So, how do I generate the additional mnamespace reference xmlns:gx="http://www.google.com/kml/ext/2.2 ?
Any suggestions would be greatly appreciated.
And of course, when weve found that, how do I reference the gx:elements?
Public Class gxPlaylistType<br/>
<System.Xml.Serialization.XmlElementAttribute("gx:FlyTo")> _<br/>
Public gxFlyTo() As gxFlyToType <br/>
End Class
only returns
<gx_x003A_Playlist> instead of >gxlaylist>
View the full article
Google Earth (http://code.google.com/apis/kml/documentation/kmlreference.html#kmlextensions) advises I need to start with:
<kml xmlns="http://www.opengis.net/kml/2.2" xmlns:gx="http://www.google.com/kml/ext/2.2
When I use
<System.Xml.Serialization.XmlRoot("kml", Namespace:="http://earth.google.com/kml/2.0", IsNullable:=False)> _<br/>
Public Class kmlType
I get:
<kml xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://earth.google.com/kml/2.0
So, how do I generate the additional mnamespace reference xmlns:gx="http://www.google.com/kml/ext/2.2 ?
Any suggestions would be greatly appreciated.
And of course, when weve found that, how do I reference the gx:elements?
Public Class gxPlaylistType<br/>
<System.Xml.Serialization.XmlElementAttribute("gx:FlyTo")> _<br/>
Public gxFlyTo() As gxFlyToType <br/>
End Class
only returns
<gx_x003A_Playlist> instead of >gxlaylist>
View the full article