G
Gene Vangampelaere
Hi,
I'm having a frustrating problem
I have an XML like this :
<?xml version="1.0" encoding="utf-8"?>
<cgb>
<parameters>
<parameter>
<paramName>patientNr</paramName>
<paramValue>7507244765</paramValue>
</parameter>
<parameter>
<paramName>ApplicationKey</paramName>
<paramValue>cpd</paramValue>
</parameter>
</parameters>
<!-- here-->
</cgb>
and I want to add 2 more "parameter" rows. When I use my function the
parameters are added where I put the comment line.
My function :
Dim ds As New DataSet
Dim reader As XmlReader = New XmlTextReader(New StringReader(xmlParameters))
ds.ReadXml(reader)
Dim row As DataRow
row = ds.Tables("parameter").NewRow
row("paramName") = paramName
row("paramValue") = paramValue
ds.Tables("parameter").Rows.Add(row)
Return ds.GetXml
What am I doing wrong ? I want my xml like this
<cgb>
<parameters>
<parameter>
<paramName>patientNr</paramName>
<paramValue>7507244765</paramValue>
</parameter>
<parameter>
<paramName>ApplicationKey</paramName>
<paramValue>cpd</paramValue>
</parameter>
<parameter>
<paramName>GUID</paramName>
<paramValue>84BA0FFC-2BE2-401f-A294-EFB00CA3A3A9</paramValue>
</parameter>
<parameter>
<paramName>SID</paramName>
<paramValue>01050000000000051500000071459C02367CDD12DA1B396F41090000</paramValue>
</parameter>
</parameters>
</cgb>
I'm having a frustrating problem
I have an XML like this :
<?xml version="1.0" encoding="utf-8"?>
<cgb>
<parameters>
<parameter>
<paramName>patientNr</paramName>
<paramValue>7507244765</paramValue>
</parameter>
<parameter>
<paramName>ApplicationKey</paramName>
<paramValue>cpd</paramValue>
</parameter>
</parameters>
<!-- here-->
</cgb>
and I want to add 2 more "parameter" rows. When I use my function the
parameters are added where I put the comment line.
My function :
Dim ds As New DataSet
Dim reader As XmlReader = New XmlTextReader(New StringReader(xmlParameters))
ds.ReadXml(reader)
Dim row As DataRow
row = ds.Tables("parameter").NewRow
row("paramName") = paramName
row("paramValue") = paramValue
ds.Tables("parameter").Rows.Add(row)
Return ds.GetXml
What am I doing wrong ? I want my xml like this
<cgb>
<parameters>
<parameter>
<paramName>patientNr</paramName>
<paramValue>7507244765</paramValue>
</parameter>
<parameter>
<paramName>ApplicationKey</paramName>
<paramValue>cpd</paramValue>
</parameter>
<parameter>
<paramName>GUID</paramName>
<paramValue>84BA0FFC-2BE2-401f-A294-EFB00CA3A3A9</paramValue>
</parameter>
<parameter>
<paramName>SID</paramName>
<paramValue>01050000000000051500000071459C02367CDD12DA1B396F41090000</paramValue>
</parameter>
</parameters>
</cgb>