0

Suppose I have the following xml content:

<Array n="3" type="int">1 22 3</Array>

I have created the following vb.net class:

Imports System
Imports System.Xml.Serialization

<Serializable()> _  
<XmlRoot("Array")> _
Public Class PmmlArray
    <XmlAttribute("n")> _
        Public n As Integer
    <XmlAttribute("type")> _
        Public type As ArrayType
End Class

So I'm able to get the "n" value and the "type". My question is: how can I get the array content, I mean, the value "1 22 3"? In Java I would use "@xmlvalue" but there is nothing similar in vb.net. Can anybody help me please? Thanks a lot!

Anemoia
  • 7,928
  • 7
  • 46
  • 71
chufabit
  • 105
  • 10

1 Answers1

0
<XmlText()>
Public arrayContent As String
  • String.Split will help you transfer 1 22 3 to a string array, and
  • Enumerable.Select will help you create an integer array out of a string array.
Heinzi
  • 167,459
  • 57
  • 363
  • 519