Hi All

I have an XML file with data stored as a composite within other data. When I try to add a new row to a perticular element, which is within another element, it simply adds it to the root element? For example, I have the following XML
<?xml version="1.0" encoding="utf-8" ?><config xmlns="http://tempuri.org/config.xsd"><file><file_extension>txt</file_extension><modify_runtime>true</modify_runtime></file><threads><thread><file_type>INVOICE,CREDIT_NOTE</file_type><max_threads>3</max_threads></thread><thread><file_type>STATEMENT</file_type><max_threads>1</max_threads></thread></threads></config

I read this into a DataSet, but when I try to add a new 'thread' element, it gets added to the 'config' element rather than 'threads'. The (ASP.NET\VB.NET) code I am using is

Dim oDSConfig As DataSet = New DataSet(
oDSConfig.ReadXml(Server.MapPath(Request.ApplicationPath) & "\config.xml"
With oDSConfig.Tables("file").Rows(0
.Item("file_extension") = txtFileEx.Tex
.Item("modify_runtime") = "true
End Wit

Dim oDR As DataRo
oDR = oDSConfig.Tables("thread").NewRo
oDR.Item("file_type") = txtFileType.Tex
oDR.Item("max_threads") = txtFileType.Tex
oDSConfig.Tables("thread").Rows.Add(oDR

oDSConfig.WriteXml(Server.MapPath(Request.ApplicationPath) & "\config.xml"

Thanks for any help
Steve