DataSet getXML method

Results 1 to 2 of 2

Thread: DataSet getXML method

  1. #1
    Join Date
    Dec 1969

    Default DataSet getXML method

    I want to access a dataset using the xml returned by the getXML, but the xml attributes have prefixes attached to them (like d4p1:AccountKey). The prefixes seem to change, so is there any way I can find this prefix?

  2. #2
    Join Date
    Dec 1969

    Default RE: DataSet getXML method

    Do you want to find it or just eliminate it.<BR><BR>I&#039;m sure that you could find it via its Schema.<BR><BR>If you want to eliminate it then, alas, I know very little about DataSets and Schemas so I&#039;m sure there&#039;s a simple way of doing it with Schemas, however, I think that you can influence how Xml is created by using ColumnMappings...<BR><BR>Here&#039;s a small (largely untested) sample of what I mean:<BR><BR>&#039; create via constructor<BR>Dim colA As DataColumn = New DataColumn("FirstName", _<BR> Type.GetType("System.String"), "", MappingType.Element)<BR><BR>&#039; create after constructor<BR>Dim colB As New DataColumn()<BR>colB.DataType = Type.GetType("System.String")<BR>colB.ColumnMapping = MappingType.Element<BR><BR>&#039; Append columns to a table<BR>Dim someTable As New DataTable("Foo")<BR>someTable.Columns.Add(colA)<BR>someTable.Columns.Add(colB)<BR>

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts