Search code examples
delphitxmldocument

XMLNode with more values and same name


I must create xml document with node that has more values with same name

<PstlAdr>
  <Ctry>SI</Ctry>
  <AdrLine>Gosposvetska 12</AdrLine>
  <AdrLine>Kranj</AdrLine>
</PstlAdr>

With oNode.ChildValues['AdrLine'] := ... it is not possible - only one value with same name can be added. How can I add more values with same name?

Best regards


Solution

  • You can do it like this:

    oNode.AddChild('AdrLine').Text := ...