Generate XML File from XSD schema #2

I have imported my xsd file into the .Net project, then I generated
the Dataset through the XSD schema.

I would like to have the following result:
<MITR>
  <DONNEESVENTE>
    <DVIDCARTE\>
    <NUMCONTRAT\>
    <ZONES>
      <NbSections\>
    </ZONES>
  </DONNEESVENTE>   
</MITR>

but I have this with the following code to build my XML file.
<MITR>
  <DONNEESVENTE>
    <DVIDCARTE\>
    <NUMCONTRAT\>
  </DONNEESVENTE>   
  <ZONES>
    <NbSections\>
  </ZONES>
</MITR>


        Dim oHDS As New MITR 'the root of the schema

        Dim SqlConnString As String = "..."
        Dim ds As DataSet = SqlHelper.ExecuteDataset(SqlConnString,
MyStoredProc")

        Dim r As DataRow
        For Each r In ds.Tables(0).Rows
            Dim oHRow As MITR.DONNEESVENTERow =
oHDS.DONNEESVENTE.NewDONNEESVENTERow
            oHRow.DVIDCARTE = Convert.ToString(r("NumSerie"))
            oHRow.NUMCONTRAT = Convert.ToString(r("NumContrat"))
            oHDS.DONNEESVENTE.AddDONNEESVENTERow(oHRow)

Dim oHRow1 As MITR.ZONESRow = oHDS.ZONES.NewZONESRow
            oHRow1.NbSections = 1
            oHDS.ZONES.AddZONESRow(oHRow1)

            oHDS.AcceptChanges()


        Next
        oHDS.WriteXml("c:\ProduitVendu.xml")
        oHDS.Clear()


Can someone help me???????????
0
12/30/2004 2:45:34 PM
dotnet.xml 7266 articles. 0 followers. Follow

0 Replies
412 Views

Similar Articles

[PageSpeed] 53

Reply:

Similar Artilces:

text wrap refusal #2
Bernard & Gord Thank you for taking the time to help. It turns out that by formattin the rows to autofit, my problem disappeared. Do -- kildevi ----------------------------------------------------------------------- kildevil's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=631 View this thread: http://www.excelforum.com/showthread.php?threadid=27065 ...

Recovery Storage Groups #2
I have 2 administrative groups: SFO and NYC SFO has 2 servers: SFEX and SFEX1 NYC has 2 servers: NYEX and NYEX1 The servers with the 1 suffix are for recovery purposes only. I created Recovery Storage Groups on both SFEX1 and NYEX1. When I attempted to add a database to recover in NYEX1, I'm prompted with both the mailbox store for NYEX and NYEX1. But when I do the same in SFEX1, I'm only given the option to add the mailbox store for SFEX1 and not SFEX. How do I get it to find the the mailbox store for SFEX? Both SFEX and SFEX1 are running Exchange Server 2003 w/ SP1. Plea...

client using 4.0 but never applied rollup 2
Does rollup 2 need to be applied to a client's computer if they upgraded to 4.0 but did not apply the rollup 2 patch? No, the roll up patch 2 is only meant for CRM 3.0 not for titan 4.0. SO, you can start using CRM 4.0 without updating the rollup. "kfainter" wrote: > Does rollup 2 need to be applied to a client's computer if they > upgraded to 4.0 but did not apply the rollup 2 patch? > ...

HTML Help not closing the file
I am using HTML Help to display help information within my Excel program. After I close HTML Help, the file system thinks that the .chm file is still being accessed, and I cannot overwrite the file (although the HTML Help process is closed). Here is the code that I have to open: Call HtmlHelp(0, ActiveWorkbook.Path & "\MyHelp.chm", HH_DISPLAY_TOPIC, 0) or Call HtmlHelp(0, ActiveWorkbook.Path & "\MyHelp.chm", HH_HELP_CONTEXT, 1001) and to close: Call HtmlHelp(0, 0, HH_CLOSE_ALL, 0) ...

Print PDF files with margins cut
If I print a pdf file with the source listed below, print out with the trimmed edges. In fact I get a technical drawing with the missing information. The same results if I print from explorer context menu. If I open the pdf file with Acrobat and do printing, the printed sheet is correct. How do I properly print the entire PDF file through code? Thanks Regards i forgot the source that i use: Process proc = new Process(); proc.StartInfo.FileName = "c:\\filo.pdf"; proc.StartInfo.Verb = "Print"; proc.StartInfo.CreateNoWindow = true; proc.StartInf...

Migration Question #2
Have an NT4 Server w/ Exch 5.5...........network upgrade dictates the NT4 box be wiped and Win2K Server installed with Exchange 2000 on top of it. We have Exmerged the mailboxes out into pst files.............the W2K server will be joining a new domain with the same user accounts as NT4 domain. Aprox 100 user accounts are aliased to there mail accounts......example...user acct is User12Loc3 and the User12Loc3 user account has email aliased as BSmith@mycompany.com. Is a procedure available to map the pst files back to the user accounts when we Exmerge back into Exch 2000? Thanks First mak...

Can publisher 2003 open files from publisher 2000
I had an e-mail sent to me with an attatchment of publisher 2000 and I have just installed publisher 2003 and I can't open it. 2003 will open 2000 documents. Disable "script blocking" if you have Norton and Office Plug-ins in Norton options and try again. -- Mary Sauer MS MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "melboy" <melboy@discussions.microsoft.com> wrote in message news:B133C378-2FB0-4DEA-95F6-B7AF9F3378A0@microsoft.com... >I had an e-mail sent to me with an attatchment of publisher 2000 and I have > j...

System.OutOfMemoryException on Large Files)
hello, I get XXX when I run the following code (if and only if the outcome of transformation is beyond 20 MB) With _Xslt .Load(XslFile) .Transform(XmlDocument, Nothing, MyWriter, Nothing) End With If I run this in .NET 2.0 Beta 2, it gets on and it's much faster as well. If run the same on MSXML 4.0, it's works and it's much faster too. Is this a known issue in .NET 1.1 ? Is there a way around it? or do I have to switch to MS XML 4.0 for now? -- Mohammed Banat Mohd Banat wrote: > I get XXX when I run the ...

automatic sort #2
I have a spreadsheet with columns A:G and unlimited rows. Is there any way to automatically sort the whole sheet in alphabetical order by, let say column G? The problem is that users of this sheet enter data in the rows and I need it to be sorted as I mentioned above but many of them don't know much Excel and can't do the sort from the menu so I was thinking maybe some kind of macro could do it but I don't know how to write it. I should mention that I already have macro on that sheet that sets up printing area, also with ctrl+D it deletes the current row and moves everything up so ...

CTRL-END #2
Pushing CTRL - END in excel sometimes takes the cursor to a position (cell) far below the real last active cell, as if it is still remembering the former position when certain rows were not yet deleted . How can we reset this? If you make an entry in cell D10, then delete it and make an entry in D8, the spreadsheet still considers D10 to be the lower right corner. If you delete rows 9 and 10 and then save the file, D8 will be the lower right corner. See http://www.contextures.com/xlfaqApp.html#Unused for a solution -- HTH RP (remove nothere from the email address if mailing direct) ...

Recovery of ASD files
My computer crashed and was in the middle of working on two Word files. When I rebooted and started Word I was not given the automatic auto recovery function. I did find the auto recovery (.asd) files and made copies and renamed as .wbk files. I could not open either .asd or .wbk files ("Word cannot open because unsupported file type"). Is there a way to open these files in Word? I was able to open in notepad but most of the data inside the file was not readable. Thanks. ...

Xml Serialization Control
Greetings, I used the XSD tool to generate a C# class of fields from a very complex Schema that was created in BizTalk 2004. When it encounters one of the properties who's type is a class (I changed to a List<> from an array [] beacuse it is easier to populate from multiple unknown sources when doing internal mapping but it makes no difference regarding my question which way I choose to do it -- the problem is the same): /// <remarks/> [System.Xml.Serialization.XmlArrayAttribute(Form = System.Xml.Schema.XmlSchemaForm.Unqualified, IsNullable = true)] [System.Xml.Seriali...

Can I have 2 customer ID's roll up into 1 invoice
We have a customer that buys 2 different lines of our product. Currently we are using 1 customer ID and putting both lines of product on the same order & invoice. For reporting purposes, we need to be able to divide the different lines into separate divisions. We still need to input both lines of product on 1 order/invoice. Any thoughts? -- Phil Camp Director of Information Hopkinsville Milling Company What kind of reporting are you talking about Phil? There are a number of ways of classifying product that will enable segregation on reports. Frank Hamelly MCP-GP, MCT East Co...

2 401K accounts with the same company
My wife and I both work at the same Company and our 401K is also throughthe same company (John Hancock) we can only have one account tied to an indvidule fund but we both have the same investment options selected. Does anyone know a way around this? Thank you, Bill On Sun, 6 May 2007 08:09:01 -0700, Bill <Bill@discussions.microsoft.com> wrote: >My wife and I both work at the same Company and our 401K is also throughthe >same company (John Hancock) we can only have one account tied to an indvidule >fund but we both have the same investment options selected. > >Do...

Saving files automatically
Hi, I have a macro to save a number of different versions of my file for different budget holders. When this is run, it recognises that the file already exists and prompts to allow it to be overwritten. Is there some VBA I can add to accept the prompt automatically? Thanks Richard application.displayalerts = false 'your code to save application.displayalerts = true Richard Burton wrote: > > Hi, > > I have a macro to save a number of different versions of my file for > different budget holders. When this is run, it recognises that the file &g...

Help reading XSD as embedded resource with SQLXMLCommand
I'm reading xml from SQL Server 2K with VB.net using an XSD schema file and SQLXML 3.0. I have the below code working fine, but I'd like to change the code from reading the schema file from a directory to reading the schema as an embedded resource. Here's my current code, what would I need to change?? Dim strm As Stream Dim strmReader As StreamReader Dim cmd As New SqlXmlCommand("MyConnectionString") Dim xmlDoc As New XmlDocument Dim strXML As String With cmd .CommandText = "MyXPath" .CommandType = SqlXmlCommandType.XPath .SchemaPath = "C:\MySche...

seem to have deleted 'file' and 'edit' from my menu in Word 2008
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I'm not entirely sure how I have done this! But I cannot seem to get either file or edit to appear on my Word menu, it basically just starts off with 'view'. <br><br>Any help much appreciated!!! In the View menu select Customize Toolbars & Menus. On the Toolbars & Menus page click the name of the Menu Bar, then click the Reset button & see if things are put right when you OK out. -- HTH |:>) Bob Jones [MVP] Office:Mac <Richy78@officeformac.com> wrote ...

Back-up #2
I'm running MSMoney 2001. It has started needing two disks to BU. I tried and finally got it to back-up to a CD but I keep getting bugged to run BU to a floppy. How can I get the program to recognize I am backing up to a CD? Regards, fatjac In microsoft.public.money, Jack Tanner wrote: >I'm running MSMoney 2001. It has started needing two disks to BU. >I tried and finally got it to back-up to a CD but I keep getting bugged to >run BU to a floppy. > >How can I get the program to recognize I am backing up to a CD? I suggest you make your "floppy" backup...

Why isn't data that is automatically generated in my form showing up in table?
Ok, I've been messing with this problem all day (for those of you who have been following me, I'm so sorry!). But I think I finally figured out the root of my problem. I have created a form that allows users to enter in an employee's clock number using a combo box and it automatically generates the employee's name in a text box next to it by pulling information from the Employee Data table. This data shows up fine in the form view and the datasheet view. However, when I open the table up that this data is being saved to (Weekly Data), the data that has been automatically...

Hyperlinks in Publisher #2
The insert function of our Publisher 2000 does not have the command to insert Hyperlinks. How can we get this command in Publisher 2000? Thanks refer to http://www.publishermvps.com/Default.aspx?tabid=30 -- David Bartosik - MS MVP for Publisher help: www.davidbartosik.com enter to win Pub 2003: www.davidbartosik.com/giveaway.aspx "Bill" <anonymous@discussions.microsoft.com> wrote in message news:5e5701c474c6$dae47b50$a401280a@phx.gbl... > The insert function of our Publisher 2000 does not have > the command to insert Hyperlinks. How can we get this > command in...

Chart names #2
I am producing an Excel sheet with several pages of identical looking charts sourcing different data sets. 6 charts to a page and 4 pages worth of charts. I am using VBA to automatically change the scale of the charts and want to automate it a bit more: The VB code I want to use is similar to: For Sheet_Num = 1 to 4 For Graph_Num = 1 to 6 Set myRange = Worksheets(Sheet_Num).Range(Graph_Num) etc. Next Next However, I currntly need to put a translation table in to convert the Graph_Num into the actual graph name (Chart 1, Chart 14, Chart 16, etc.) I just want to rename the actu...

Combining 2 cells
I have a range of scores for a test in cells A10 thru A100. In Cell A1 I have a the formula =COUNTA(A10:A100) that returns the number or n of scores. In cell A2 I have the formula =SUM(A10:A100)/A1 which returns the mean for the range. In cell A3 I have the formula =STDEV(A10:A100) which returns the standard deviation for the range. Cells A2 and A3 are formatted as numbers with 2 decimal places (ex., 1.55). I've combined cells A2 and A3 into another cell with the formula =A2& " / " & A3 to be able to view the mean/standard deviation in the same cell (ex., 9.5 / 1.5)...

Advanced Distribution #2
We have a customer that wants to stop using advanced distribution for some of their documents. They took the fulfillment invoice transferred to backorder and now wants to transfer the backorder to an order but when they attempt to transfer, no documents transfer. My thought on this is becuase it started as a fulfillment document this is not an optionto do. Any thoughts on how to do this? Thanks! If you were able to transfer the fulfillment orders to back order documents, you should now be able to void the fulfillment orders. In order to be able to transfer the back orders to sales or...

Use of hexadecimal 0x1d in XML Visual studio 2005
Hello group, I have an XML file with a sample as <message name="E51&#29;SG22" />. This XML uses the ascii 29 character. In Visual studio 2003 IDE this document opened without any errors, but in VS 2005 i get an error Character ' ', hexdecimal value 0x1d is illegal in XML documents. How should be able to rectify this problem?. Anyway for a quick solution that doesn't break the schema Thanx in advance Suraj ...

Checking if files open prior to running macro
Is it possible to check if a number of files are open prior to running a macro that pulls data from the required files. After testing with a file open, Excel does not prompt you that the files is already open but when trying to save the files to overwrite the original the macro falls down. Thanks in advance!!! This is a repost--newsreader problems. But I did want to add that if you're using xl2k or higher, you can remove the split97 function and just change this line: mySplit = Split97(FileNameToCheck, "\") to mySplit = Split(FileNameToCheck, "\") (Split was a...