.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Post New Web Links

Help Needed to convert 2 - dimentional array to xml file

Posted By:      Posted Date: September 24, 2010    Points: 0   Category :ASP.Net

Hi Friends,

          I am having an issue with 2 - dimentional array.

Will you please help on this.


I getting table data as object from SAP Rfcs using SAP Automation Activex Controls.

data object has columns as 1 - dimentional array and rows as 2 - dimentional array

I need to convert this table object into xml without using loops ( for higher performance)

XML Format :









Below is the code which i have written:

                 Dim objTable As Object = myFunction.Tables("IOUTPUT_DATA")

                Dim ds As New DataSet("IOUTPUT_DATA")
                Dim dt As New DataTable("ITEM")

View Complete Post

More Related Resource Links

Convert excel file into xml


Hai, I have two columns with id,name in the excel sheet.I want to convert into xml file in the below format

<?xml version="1.0" encoding="utf-8"?>

<guide xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <Boat id="1"> <name> Copper Kettle </name> </Boat> <Boat id="2"> <name> Copper Penny </name> </Boat> <Boat id="3"> <name> Copperhead </name> </Boat> <Boat id="4"> <name> Coppertone </name> </Boat> <Boat id="5"> <name> Copy Boy </name> </Boat> </guide>

suggest me with sample code in ASP.NET. Thanks


convert SQL data to EDI 835 file


I was assigned to create a app to convert SQL data to EDI 835 file. (Electronic Data Interchange file for Health Care Claim Payment/Advice,  outbound process only).

Can someone help me where to start?

Convert Data from TXT file and face a length issue! Need help!

Hi All, I am trying to convert some TXT files in to sqlserver database by using SSIS.  The problem I am facing right now is that some TXT files I have are fixed with line length 286.  However, for the some other TXTs they have 296 characters per line. The reason why this happened is some one added one more field before generating those TXTs.  Instead of creating two SSIS packages for converting those TXTs, can I find another way to get around this?   

convert xml file as text file using xml document

hi i want to convert to xml file to text file using xml document.. M not much aware of xml..so please guide me.... my boss told me don use xmltextreader and using xml document convert to txt file.....  

How to convert the .msi file to EXE

How to convert the .msi file to EXE?   I have IE7 admin kit .msi file. I want to convert as EXE file.   Otherwise send me the link for IE7 admin kit EXE.   please help....     Thanks, Dharani.

How to convert a Excel file data into XML fastly

Hi all,        I have a excel file thats having content of the persons details.My code is as follows.Approximately the Excel sheet having 10,000 records   Form Load  ======= Conn = new OleDbConnection(ConnectionString);             try            {                if (Conn.State == ConnectionState.Closed)                    Conn.Open();                 string sql = "SELECT * FROM [Sheet1$]";                Cmd = new OleDbCommand(sql, Conn);                 DataAdapter.SelectCommand = Cmd;                                DataAdapter.Fill(ds, "Import_XML");                Rec_count = ds.Tables["Import

convert .eml file to .msg file in a document library

Hi All, My requirement is as follows. I have a document library to which users will upload .eml files.On the itemadded event of this doc lib, i'll have to convert the eml file to .msg file. Any help on ways to achieve this is appreciated.Hanif

Convert the .eml file to .msg file in a document library

Hi All, My requirement is as follows. I have a document library to which users will upload .eml files.On the itemadded event of this doc lib, i'll have to convert the eml file to .msg file. Any help on ways to achieve this is appreciated.Hanif

Reading in values in text file in a project solution to an array



I have a tab delimited text file that has 6 columns (all integers) and 500 rows (and no column headings) called ProjectData.txt that I have added to my Windows Form Application (c#) (by added I mean I have it in my project solution). 

I have declared an array in my code called ProjectDataArray which has dimensions [500, 6].

I wish to load each column of each row into the array.

All the code I have seen shows how to do this for text files that are not included in the project solution. 

Is this easy to do?

Ajax file upload: example needed



So far, I have built a MVC application that has a file upload form. The upload is done the "old" way, i.e. with a full postback.
Now, I wish to do the upload in the background using AJAX. There are a lot of samples for asp.net, but no for MVC.

Could someone give me an example of an upload form using AJAX in a MVC application?
How can I change my application to work with AJAX?

Thanks a lot for your help.


how to convert file with .tvr extension to notepad then read the file



            My text file consist of following data.In the below file i have to read dates( for example 9/13/2010 and corresponding Time 1300-2100) and empname Abbott,Luis insert into databse. similraly remaining dates.I have to ignore first 15 lines





-------------------- ----------- ----------- ----------- ----------- ----------- ----------- ----------- -------------
 Monday Tuesday Wednesday Thursday Friday Saturday Sunday 
 9/13/2010 9/14/2010 

Convert array to Text


I am using MS Visual Studio 2008, Standard Edition, Visual C++, CLR Windows Forms Application.

I have an array and I would like to know how to place one of the members of the array into a textBox. It could be any one of the members. It seems like this should be an easy thing to do but I cant figure it out.

The array is;  array<DriveInfo^>^ DI = DriveInfo::GetDrives(); 

textBox1->Text = one of the array members

Does anyone know how to place a member of the array into a Windows Form textBox?


To convert an string to a XML File?



     I have converted an XML file content to a string.. Now i want to write the same string to a new XML file.. Can someone help me out?


string strXML = "<CountriesList><Countries> <CountryName>Austria</CountryName></Countriees></ContriesList>";

   I want to convert the above string into a New XML File..


how to insert a path file into an array and listview using openfiledialog with multiselect property?



i have problem to insert path file into an array and listview(detail) using open file dialog wit multiselect property, please give me sample to make it?

Is it possible to convert WSDL file back to Service Contract Interface for hosting? (WCF)


Hi there,

I would like to convert WSDL file to Service Contract Interface for hosting purposes. I know there is an option  to create proxy classes for clients using SVCUtil.exe or WSDL.exe. But this is not i would like to do.

I have a situation where, one of our clients have already hosted webservice. And I need to host a similar webservice. so to do it I must hand craft whole service contract Interface from the scratch. So without writing from the start can I use the existing WSDL to create the service contract Interface and the implementation class automatically with some tool?



Converting a binary file to byte array


Hi Everyone-

I'm retrieving a binary file from the database, a .pdf file that I would like to let the user open and view.  From what I can tell, there are two steps to do this: 

1. Convert binary file to byte array  

2. Convert byte array to file content 

Here's what I've got so far:

 Dim c1 = (From c In dc.Documents _
                     Where c.userID = userGuid _
                     Select New With {c.downloadName, _
                                     c.docData, _
                                     c.type, _

             Dim bArray As Byte() = CType(c1.docData("binary"), Byte())
            If bArray.Length > 0 Then
                Dim fs As System.IO.FileStream = New System.IO.FileStream("d:\xx.pdf", IO.FileMode.Create)
                fs.Write(bArray, 0, bArray.Length)
            End If

This isn't working and I'm having a heck of a time trying to find a solution.  I'm getting a blue squiggly under c1.docData in the Dim bArray line. 

What am I doing wrong?

Restore Data only after failed drives, Log file is good on a separate drive array

We have a 2000 sql server.  Our drive array housing the mdf file has taken a dump.  The drive array housing the ldf file is fine.  I have a full backup as of 2 hours ago.  I know I can restore to that point in time.  However, the transactions sitting in the ldf file are critical to get applied the the restored mdf file.  In reading I see I can restore log files using the "With NoRecovery" option, however, I don't wan't to restore any log files, as I'm thinking the one I have is good.  I want to be able to restore the mdf file and then have the database apply the transactions in the log file on the mdf file. (I want the "redo" phase to use the current ldf file, not a restored ldf file) Any Ideas?
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend