Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Avoiding the XML preserve syntax
Message
De
29/04/2006 16:47:52
 
 
À
29/04/2006 16:42:34
Information générale
Forum:
ASP.NET
Catégorie:
XML
Divers
Thread ID:
01117317
Message ID:
01117838
Vues:
14
>The only way I can get that syntax to show up in the written XML file is if it was specified that way in the DataSet prior to doing a .WriteXml(). The only way I could figure out how to specify it in the DataSet was to create the DataSet with .ReadXml() from XML that already has that syntax in it. There may be some DataSet, DataTable or DataColumn property that specifies this, but I don't know if there is. So, then it all boils down to how are you populating this DataSet to begin with?

Here is how I create the dataset:
        Dim loDataSet As DataSet = New DataSet
        loDataSet.Tables.Add("Temp")
        loDataSet.Tables(0).Columns.Add("Claim_No", GetType(System.String))
        loDataSet.Tables(0).Columns.Add("Supplement", GetType(System.String))
Then, I scan the main dataset and take the required data in the dataset that was created manually:
        For lnCounter = 1 To toDataProvider.nCount
            loRow = toDataProvider.oDataView(lnCounter - 1).Row
            loRow2 = loDataSet.Tables(0).NewRow
            loRow2("Claim_No") = Trim(loRow("No_Claim"))
            loRow2("Supplement") = Trim(loRow("Supplement"))
        Next
Then, I do the export.
        loDataSet.WriteXml(oApp.cHttpFat + lcFile, XmlWriteMode.IgnoreSchema)
Michel Fournier
Level Extreme Inc.
Designer, architect, owner of the Level Extreme Platform
Subscribe to the site at https://www.levelextreme.com/Home/DataEntry?Activator=55&NoStore=303
Subscription benefits https://www.levelextreme.com/Home/ViewPage?Activator=7&ID=52
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform