XML prefix
HejJeg har følgende XML-kode som jeg har problemer med at læse:
Udsnit af XML:
<message:AIXMBasicMessage gml:id="uniqueId">
<message:hasMember xlink:type="simple">
<aixm:VerticalStructure gml:id="uuid.00255605-c6b2-475b-837f-3cc1a5fb7b6e">
.....
</aixm:VerticalStructure>
</message:hasMember>
</message:AIXMBasicMessage>
Jeg har disse klasser:
<XmlRoot(ElementName:="hasMember")>
Public Class HasMember
<XmlElement(ElementName:="VerticalStructure")>
Public Property VerticalStructure As VerticalStructure
<XmlAttribute(AttributeName:="type")>
Public Property Type As String
<XmlText>
Public Property Text As String
End Class
<XmlRoot(ElementName:="AIXMBasicMessage")>
Public Class AIXMBasicMessage
<XmlElement(ElementName:="hasMember")>
Public Property HasMember As List(Of HasMember)
End Class
<XmlRoot(ElementName:="Root")>
Public Class Root
<XmlElement(ElementName:="AIXMBasicMessage")>
Public Property AIXMBasicMessage As AIXMBasicMessage
<XmlAttribute(AttributeName:="message")>
Public Property Message As String
<XmlAttribute(AttributeName:="xlink")>
Public Property Xlink As String
<XmlAttribute(AttributeName:="aixm")>
Public Property Aixm As String
<XmlAttribute(AttributeName:="gml")>
Public Property Gml As String
<XmlText>
Public Property Text As String
End Class
Problemet ligger i message: / aixm: / xlink: / gml: for hvis jeg fjerner disse, virker det.
Men hvordan skal koden være, så jeg ikke skal fjerne noget i xmlfilen?