Hello, I currently have this XML schema :
<PSC5>
<POI_ORI>
<CIT>LIM</CIT>
</POI_ORI>
</PSC5>
if user want to add a new option, the final schema will be :
<PSC5>
<OPT>132<OPT>
<POI_ORI>
<CIT>LIM</CIT>
</POI_ORI>
</PSC5>
if not just keep like :
<PSC5>
<POI_ORI>
<CIT>string</CIT>
</POI_ORI>
</PSC5>
Im using the following snippet :
Dim oXMLDocument As New XmlDocument
oXMLDocument.Load(strFileSchemaAWEB)
Dim oNavigator As XPath.XPathNavigator = oXMLDocument.CreateNavigator()
If not dtbParameters.Rows( 0 ).Item(5).equals("") Then
oNavigator.AppendChild("<OPT>16</OPT>")
it throws me an exception on AppendChild, when I try to generate the second XML Schemma :
this document already has a 'DocumentElement' node.
Im Using VB.NET Framework 2.0
Thanks for help,