473,473 Members | 2,357 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

creating a xml file dynamically using VB

3 New Member
hi,
i want to create a xml file dynamically,
that is

i have 2 arrays, i want to run a program to fill that array, if the array size becomes 2KB i want to create a xml file
like this

Expand|Select|Wrap|Line Numbers
  1.  <detail> 
  2.  
  3. <person> 
  4. <address> </address> 
  5. <age> </age> 
  6. <data>cntents of array 1</data> 
  7. </person> 
  8.  
  9. <education> 
  10. <primary> </primary> 
  11. <degree> </degree> 
  12. <data> contents of array 2 </data> 
  13. </education> 
  14.  
  15. <person> 
  16. <address> </address> 
  17. <age> </age> 
  18. <data>cntents of array 1</data> 
  19. </person> 
  20.  
  21. <education> 
  22. <primary> </primary> 
  23. <degree> </degree> 
  24. <data> contents of array 2 </data> 
  25. </education> 
  26.  
  27. <person> 
  28. <address> </address> 
  29. <age> </age> 
  30. <data>cntents of array 1</data> 
  31. </person> 
  32.  
  33. <education> 
  34. <primary> </primary> 
  35. <degree> </degree> 
  36. <data> contents of array 2 </data> 
  37. </education> 
  38.  
  39.  
  40. </detail> 
  41.  
i want to repeat this untill data over

is it possible to do this
that is, if i accumulated 2KB of data write it into the xml file at the appropriate tag,
then accumulate next 2KBs of data like that plese help in this regard
Aug 22 '06 #1
1 1876
MrSly
1 New Member
Here is an xml data what I want,
ex.
I have two tables under a dataset. One id DeptTable and Another table is EmpTable

DEPTID LOATION EMPID EMPNAME AGE
--------------------------------
10 LA 101 Peter 30
10 LA 102 Joe 20
20 BOSTON 103 Jean 24
30 NY 104 Tom 28

My desired xml like follows:
<DeptAndEmployee>
<Dept id='10' Loc='LA'>
<Emp eid='101' Name='Peter' Age='30' />
<Emp eid='102' Name='Joe' Age='20' />
</Dept>
<Dept id='20' Loc='BOSTON'>
<Emp eid='103' Name='Jean' Age='24' />
</Dept>
<Dept id='30' Loc='NY'>
<Emp eid='104' Name='Tom' Age='28' />
</Dept>
</DeptAndEmployee>

Any easy & efficient way to format like this ??
how about use dataset then go trou the ds to format ??

any idea ?? via string.Format or xmlreader ?? or other good method

If any one knows pls do send me the reply to mallela.sriram@gmail.com
Thanks a lot !
Aug 27 '07 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

10
by: Ron Vecchi | last post by:
I am creating a custom web control that uses an enum for a property {Remote,InLine}. If the property is set to inline then text is read from the embedded resource and sent to the browser in the...
5
by: Praveen | last post by:
I have script files embedded as resources in my dll. During runtime, I would like to write it out into the app dir (or a app sub-dir) and send the appropriate virtual path to the client. This makes...
5
by: sam | last post by:
Hi all, I am dynamically creating a table rows and inerting radio buttons which are also dynamically created. Everything works fine in Firefox as expected. But I am not able to select radio...
5
by: laredotornado | last post by:
Hi, I'm using PHP 4.3. There is a section of my application in which I'd like users to be able to download a custom file. The file would be different for each user, so I was planning on...
1
by: Luurs | last post by:
Hi All, I've been using a asp-label in the HTML <headsection for quite some time in order to dynamically generate meta-keywords,-description, css and js references. Though the actual...
1
by: Vanyok | last post by:
Hi everyone :) I'm a newb to C-Sharp but more I learn about it - more I like it. I need some help please. I'm trying to find out to dynamically allocate form controls. For example I want to have 5...
10
by: Jess | last post by:
Hello, If I create a temporary object using a dynamically created object's pointer, then when the temporary object is destroyed, will the dynamically created object be destroyed too? My guess...
5
by: tshad | last post by:
I found I can create Template columns dynamically - as long as I don't use objects that need onclick events, such as a LinkButton. Textboxes and Labels work fine. I create the Template columns...
4
by: mohaaron | last post by:
I can think of a lot of reasons why this might need to be done but as far as I can tell it's not possible. I've been looking for a way to add HtmlTableRows to a table using a button click for a...
0
by: Syoam4ka | last post by:
My project is about jewellery. I have devided my jewelery into main types, which each one of them has sub types, and each one those sub types has the jewellery. I have a tabcontainer. It includes...
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,...
1
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
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

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.