Parse XML into Collection - general use code?

I'm a newbie so please bear with me...

I'm looking to parse XML into a Collection so that I can pass that
collection around to functions to extract data from it easily.

I'm hoping there is code already to parse std XML files into a
Collection? All I've found is code where the XML structure is already
known... I need to code to work no matter what the structure... it
would "figure out" what nodes are parents/children and such then place
them into a Collection appropriately.

Any help is appreciated!
0
alevey1 (1)
12/9/2003 5:17:59 PM
dotnet.xml 7266 articles. 0 followers. Follow

1 Replies
347 Views

Similar Articles

[PageSpeed] 44

An XmlDocument already defines a hierarchy of collections when it parses the
XML structure.  A tree structure is created.  You could use properties like
ChildNodes to enumerate the elements at a particular level.

This probably is not what you wanted so maybe you could provide more
information about the problem.

"Aaron" <alevey@cox.net> wrote in message
news:859285cb.0312090917.c0b701a@posting.google.com...
> I'm a newbie so please bear with me...
>
> I'm looking to parse XML into a Collection so that I can pass that
> collection around to functions to extract data from it easily.
>
> I'm hoping there is code already to parse std XML files into a
> Collection? All I've found is code where the XML structure is already
> known... I need to code to work no matter what the structure... it
> would "figure out" what nodes are parents/children and such then place
> them into a Collection appropriately.
>
> Any help is appreciated!


0
peter4320 (19)
12/9/2003 5:40:49 PM
Reply:

Similar Artilces:

XML Attributes in a dataset
How does one extract the attribute value from a dataset that has an XML file, such as the one in the bottom of this message, loaded into it? I need to use a dataset and the XMl file has to remain as is. <?xml version="1.0" encoding="utf-8" ?> <Groups> <Group Name="Information Technology" ID="IT" Description="Information Technology" /> <Group Name="Finance" ID="Fin" Description="Finance Group"></Group> <Group Name="Hyperion" ID="Hyp" Description="Indiv...

How do i sort contacts using more than one catagory ?
I am trying to create lists which have contacts sorted by more than one catagory. So including contacts that are linked to two or more specific catagories. Can this be done, if so how? thanks "samong" <samong@discussions.microsoft.com> wrote in message news:01E99022-AB21-487B-9365-2E66BB0C3F1B@microsoft.com... >I am trying to create lists which have contacts sorted by more than one > catagory. So including contacts that are linked to two or more specific > catagories. Can this be done, if so how? The Category field is non-sortable because it is a multi...

Can I Order My Collection?
All, If I want to build a collection in a specific order, and I'm filling it from a TableAdapter whose source query I can not change, how would I put it in the order of one of the columns in the underlying query? I've tried various things as spelled out in my book and other sources, but nothing seems to "recognize" a column name. Here's what I have; Me.QRY_ButtonsTableAdapter.ClearBeforeFill = True Me.QRY_ButtonsTableAdapter.Fill(Me.L55TimerDataSet.QRY_Buttons) Dim Row As Integer = 0 Dim ButRecds = L55TimerDataSet.Tables("...

Using OLE DB in MFC Project
Hi, I have developed an MFC application. I now want to add database functionality to it. I have had a look at the various database technologies and have decided to try using direct OLE DB rather than ADO as it is faster. However I have noticed that in tutorials it is recommended to use the wizards in an ATL project. As i have said before my application has been written in MFC. I was wondering how easy it is to add direct OLE DB to my MFC application. I would appreciate suggesstions on how i can manage this, Thanks In Advance Macca ...

population pyramids using bar charts with a secondary axis
I have a problem that I had given up as unsolvable, but after recently learning about secondary axes, I've made encouraging progress. However, I'm stuck on the last step(s), and I'm hoping that someone will have some suggestions. My organization has been producing reports that contain population pyramids. In the past, all of their reports have been printed, so it didn't matter that in order to get the desired look, they had to use two charts slightly overlapping each other. However, we are getting to the point where we would like our charts to be available online for download....

Collection with members of Great_Plains
Hello. How I can load or fill a collection with the members of project Great_Plains that correspond to the added fields? Thanks. ...

Custom Reports Using MS Access?
Ran across a thread where Glen Adams suggested using MS Access to create custom reports instead of Crystal Reports. But Glenn never said where to point Access to obtain the needed information to create the reports. Glenn, if you are watching can you give us some more info on how to use Access to create a report? I'm not Glen... I think you would use ODBC... to connect to the RMS database. Then use Access to connect via ODBC... Marc Wagner www.gmroii.net "Dan" <anonymous@discussions.microsoft.com> wrote in message news:0df801c46ea7$d79b00b0$a601280a@phx.gbl... &g...

Word 2008
Version: 2008 Operating System: Mac OS X 10.5 (Leopard) Processor: Intel I have created several files in Word 2008 using templates (.dot) files previously used with Word 2003/2007. Unfortunately, my customer keeps receiving an error when opening the new file I create. The new file (created in .doc format) has some hidden data that is pointing to the template folder on my Mac. The error looks like: Could not open: 'user:Libarary:Application Support:Microsoft:Offce:User Templates:template.dot My customer can fix this error by using the remove hidden data tool inside Office 2003, but that&...

How can I change the program used when following a hyperlink
I have a database which uses hyperlinks to take me to a set of image files, gif & jpeg. I have recently moved to Firefox. If I click on a link to a gif file it opens in Firefox, but if I do the same for a jpg it persists in using IE. The file association for jpg files on the computer are to Photoshop. But I prefer opening the links in the browser as I am only viewing, not editing, the files Anyone got any ideas JimR Use a button that when clicked calls this code (pass in the value on the hyperlink field): Public Sub OpenWebPage(url As String) Dim browser As Vari...

XML by J#
Can J# compiler generate XML file as C# compiler does. Thanks Raza wrote: > Can J# compiler generate XML file as C# compiler does. Sure, although I have no idea what do you mean saying "generate XML". -- Oleg Tkachenko [XML MVP] http://blog.tkachenko.com "Raza" <anonymous@discussions.microsoft.com> wrote in message news:072b01c4a07c$13e96bf0$a401280a@phx.gbl... > Can J# compiler generate XML file as C# compiler does. Raza, The J# compiler doesn't provide a command-line option like /doc on the C# compiler (that generates XML documentation for .cs sou...

counting using multiple criteria
Hi, I have a problem for which I can't seem to find a working solution. On the one hand I have a vertical table with employee names, the number of years they have been with the company, and all this sorted by the employee's age (in years). This table will be updated from time to time, and as such it doesn't have a fixed length. On the other hand I have a table which shows the number of employees in a particular age category (-20, 21-25, 26-30, etc) horizontally, and the number of years they have been with the company (again in groups: 0-5 yrs, 5-10 yrs, etc) vertically. ...

scripting adding obj-users and mdb-use-defaults to exchange 5.5 users
I have successfully created a script for creating exchange 5.5 users. I can't however, figure out how to add the assoc-nt-account to the obj-users [pseudo attribute] or set MDB-Use-Defaults to True :-( Can anyone offer advice on how to do this [other than generate a CSV file and use the exchange admin tool to import it]? Thanks Wayne ...

keeping footer from resizing when using the fit to page function
How do I keep the footer from shrinking in excel when i use the "fit to page" option for my worksheets. I'd like it to stay the same size no matter what the font of the worksheet is. ...

Template driver code for a new USB Touchscreen XP driver
We want to develop a new Touchscreen driver having a USB interface for Windows XP. Which driver template will be the most suitable to start the development ? make your device a HID and then you not have to write a driver at all. d -- This posting is provided "AS IS" with no warranties, and confers no rights. "sanju_emb" <sanju_emb@discussions.microsoft.com> wrote in message news:E8AAAA05-B6EA-44A7-B9E8-20E5F0A5860C@microsoft.com... > We want to develop a new Touchscreen driver having a USB interface for > Windows XP. Which driver te...

Database using Access 2.0
Our church purchased Church Windows software. When we asked if we could import our members from our existing database Greentree CDMS they said we couldn't because CW is an Access 2.0 database and we don't have that software. What would be the benefit of still using Access 2.0 for software development? Thanks, Linda Hi Linda I doubt there are many new programs being written in Access 2. It was a great piece of software, and many databases were writing using it. I don't know Church Windows, but I am guessing that it was written back in the Access 2 days (around 1994), ...

Use Datedif but for future dates
I have a formula for identifying years, months, days from a past date to now. DATEDIF(C6,NOW(),"y")&" Y, "& DATEDIF(C6,NOW(),"ym")& " M, " & DATEDIF(C6,NOW(),"md") & " D" I'd like a formula that can produce the same format (years, months, days) between now and a future date. Any ideas? Thanks in advance, Bart Hi Bart Try this with the date in A2 =IF(TODAY()<=A2,DATEDIF(TODAY(),A2,"Y") & " y " & DATEDIF(TODAY(),A2,"ym") & " m","-"&...

Error code 57E
I have Vista 32 bit XP windows Home Premium. Try to install 2007 Microsoft System KB972581 and Visio Viewer 2007 Service Pact 2, stalls at 50% install, however any other updates are installed. I have turned off the firewall and Microsoft Security Essentials and tried to install after, and still error code 57E on these 2 updates. The updates that did install are as follows... Cumulative Security Active X Killbits Microsoft Outlook 2007 Junk Mail Filter Security Essentials for Microsoft Office Windows Malicious Removal Tool Security Update I had this problem before with the SP2 ...

Creating opportunity using CRM api
Looking for an example of how to load the crm api to create an opportunity using C#. I'm way new to this and have downloaded the CRM 3.0 sdk but not sure how I access the information it contains. What I'm hoping to find is an example of creating an opportunity with just the necessary information so I can build on it from there. I appreciate any help! Hi Jeffa When you install the SDk you will notice there is a help file in the installed directory of the SDK, I think it is crmsdk3_0.chm Open the helpfile and search for create, there are lots of examples let me know if you get s...

Printout Method
In building a form to allow users to print a "blank form" I've constructed as an Access Report, I'd like the user to be able to select the number of copies to print. It looks like the PrintOut Method would be a good choice for this, but I'm not smart enough to know quite how to get the "Copies" argument to get its input from the textbox on my form, where the user will enter the number of copies they'd like to print. Suggestions? -- Thanks, Croy Does the report have a record source? -- Duane Hookom Microsoft Access MVP If I have helped you, please help...

Use of user's group with W2000
Two things: 1-If no MVP can answer a question, someone should tell the questioner so he/she can move on. Frustration is high enough without being ignored. 2-It is grossly unfair that I can't post questions because I have W2000 and am limited to Explorer6. I can't even get to this page. Microsoft should not squeeze us out of the loop. (I borrowed a friend's computer with XP and explorer7 to write this and to post my unaswered question.) ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for th...

Mail (outlook 2002), 'To' field, general question
Why do some names of some messages in the 'To' Field appear with single quotes in my Sent Box? I'm using Outlook 2002. I'm sure there's an easy explanation but it stumps me. ...

Using Regular expressions in Excell 2007
I have code written in excell 2003 where I use Regular Expressions 'heavily'. In Excell 2003 you had to import the RegExp library to be able to use it. Is Regular Expressions part of VBA in Excell 2007? or do you still need to import the RegExp library? Same as in Excel 2003, the library is part of IE not Excel or VBA. -- HTH Bob "ncunha" <ncunha@discussions.microsoft.com> wrote in message news:7EF31D63-6C38-451B-9CEF-2E091DA7B2E7@microsoft.com... >I have code written in excell 2003 where I use Regular Expressions > 'heavily'...

Display Screen 1/2 Grid; 1/2 VBE (or at least Code Window)
Is there a way (button, command, etc) to be able to view (quickly, and side by side) a my worksheet (only 1 workbook is open say) and my code window? If you just want to look at macros do a cltr+' (key to left of 1). John North Yorkshire UK "Jim May" <jmay@cox.net> wrote in message news:Fqb7d.10064$0j.2648@lakeread07... > Is there a way (button, command, etc) to be able to view (quickly, and > side > by side) > a my worksheet (only 1 workbook is open say) and my code window? > > Jim With Excel workbook open to the sheet of your choice and VBE o...

how to use "barcode" in excel 2000??
Dear all, i would like to set up an inventory system for recording the stuff. previously, i have a long table of data in excel. i need to do some tasks: 1)print the barcode out for each item 2)scan the barcode for checking the inventory. i have no idea how to start, install barcode fonts? what i have to buy and do i need to write "MARCOS"? Please help me! manymany thanks. gg It depends on how you intend printing the labels. If you're wanting simple all in one solution, 'Bizfonts' (http://www.bizfonts.com/) ca help. Another way is to use a 'bar code module (ht...

Use specific printer for reports in view mode
I designed a report using printer HP5000 PLC6 and the paper size is A3 in landscape. When I open the report in my laptop and I want to show the report in my resentation, it can not showed all contents of the reort, just a hals is shown, my question is how can we assign this printer to this reprot when I open it, although I do not need to print it, this is just for my resentation. My printer default in mypc is lHP desckjet 690c -- H. Frank Situmorang Might try installing the printer driver for the HP5000 PLC6. Might try suing the printer "Microsoft Office Document Image Writer&qu...