473,403 Members | 2,270 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

generating xml from arraylist

Hi,

I am trying to create xml document which could serve for datagrid,
however the data is contained in an arraylist and i want to populate
the grid using the data in arraylist....so can anyone please let me
know that how is it possible...or any other way to accomplish it...

Thanks in advance.

Apr 11 '07 #1
2 4535
Abid wrote:
I am trying to create xml document which could serve for datagrid,
however the data is contained in an arraylist and i want to populate
the grid using the data in arraylist....so can anyone please let me
know that how is it possible...or any other way to accomplish it...
I am not sure I understand what you are looking for but to generate XML
with the .NET framework you can either use XmlWriter (respectively
XmlTextWriter in .NET 1.1) or XmlDocument. If you have an array list
then you first need to create a root element, then loop over the array
list and create an element for each item in the array list.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Apr 12 '07 #2
On Apr 12, 4:55 am, Martin Honnen <mahotr...@yahoo.dewrote:
Abidwrote:
I am trying to create xml document which could serve for datagrid,
however the data is contained in an arraylist and i want to populate
the grid using the data in arraylist....so can anyone please let me
know that how is it possible...or any other way to accomplish it...

I am not sure I understand what you are looking for but to generate XML
with the .NET framework you can either use XmlWriter (respectively
XmlTextWriter in .NET 1.1) or XmlDocument. If you have an array list
then you first need to create a root element, then loop over the array
list and create an element for each item in the array list.

--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Dear Martin,

You got it correct...I needed to generate XML from ArrayList...and did
it in the ame way almost as you suggested...

Apr 17 '07 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
by: Alex Ting | last post by:
Hi Everybody, I have an issue about deleting an object from an arrayList. I've bounded a datagrid using this code where it will first run through all of the code in loadQuestions() and bind a...
3
by: Stephen | last post by:
I was wondering if someone can help me with an web application design problem. I have a aspx page which builds up an arraylist called addresses and outputs the values in the arraylist items to a...
6
by: Leon | last post by:
I need a program that generate 5 non-duplicates random number between 1-10 as string values store in an array. Do anybody know of any good books or websites that explain how to generator random...
6
by: gane kol | last post by:
Hi, I have a code that creates a datatable from an arraylist, but i am getting an error in casting in for (int intRow = 0; intRow < alLCPlist.Count; intRow++) { DataRow drow =...
4
by: Peter | last post by:
I run into this situation all the time and I'm wondering what is the most efficient way to handle this issue: I'll be pulling data out of a data source and want to load the data into an array so...
18
by: JohnR | last post by:
From reading the documentation, this should be a relatively easy thing. I have an arraylist of custom class instances which I want to search with an"indexof" where I'm passing an instance if the...
6
by: fniles | last post by:
I am using VB.NET 2003 and a socket control to receive and sending data to clients. As I receive data in 1 thread, I put it into an arraylist, and then I remove the data from arraylist and send it...
3
by: Christopher H | last post by:
I've been reading about how C# passes ArrayLists as reference and Structs as value, but I still can't get my program to work like I want it to. Simple example: ...
6
by: Mike P | last post by:
I am generating 12 random strings and my code works fine when I step through, but when I then let it run without stepping through and populate a listbox with the array I am building, I get the same...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.