Solved

use xml to populate array

Posted on 2004-08-01
3
300 Views
Last Modified: 2010-04-06
I know how to populate a dataset using xml.
How do I populate a 2 dimensional array with the contents of the xml file (aspx vb.net) please?
0
Comment
Question by:QPR
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 4

Accepted Solution

by:
daletian earned 50 total points
ID: 11703439
use this code snippet to load you XML file

----------------------------------------------------------------------------------------------
Dim dataSet1 As New DataSet
Dim filePath As String

filePath = "Complete path where you saved the XML file"
dataSet1.ReadXml(filePath)
----------------------------------------------------------------------------------------------

you can the bind it to any control you wish to use to display the data

eg.       dataGrid1.DataSource = objDataSet.Tables(0).DefaultView
            dataGrid1.DataBind()
0
 
LVL 29

Author Comment

by:QPR
ID: 11710500
Thanks daletian.
I've got the xml values into a dataset no problem but how do I then put the values into a 2 dimensional array?
0
 

Expert Comment

by:BodeTech
ID: 11735571
Naaaw, first loop through to count

Once counted, redim

then .MoveFirst

Then loop through to populate

array(i,0) = foo
and
array(i,1) = bar
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Snap images to the bottom of a div 5 68
WordPress/WooCommerce security best practices? 2 117
Grunt No Clean Targets 6 300
Unexpected End of File 11 83
Most of the sites are being standardized with W3C Web Standards. W3C provides lot of web standard services to the web. They have the web specification, process and documentation for all the web standards. You can apply HTML, CSS and Accessibility st…
Introduction Knockoutjs (Knockout) is a JavaScript framework (Model View ViewModel or MVVM framework).   The main ideology behind Knockout is to control from JavaScript how a page looks whilst creating an engaging user experience in the least …
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

739 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question