2007-07-03

Read xml content by XmlDocument

This sample show, How to read xml content by use XmlDocument namespace.

You can see this link for xml sample content.

Sample Code


Dim m_xmld As XmlDocument
Dim m_nodelist As XmlNodeList
Dim m_node As XmlNode

'Create the XML Document
m_xmld = New XmlDocument()

'Load the Xml file
m_xmld.Load("YourPath\test.xml")

'Show all data in your xml
MessageBox.Show(m_xmld.OuterXml)


'Get the list of name nodes
m_nodelist = m_xmld.SelectNodes("/family/name")

'Loop through the nodes
For Each m_node In m_nodelist
'Get the Gender Attribute Value
Dim genderAttribute = m_node.Attributes.GetNamedItem("gender").Value

'Get the firstName Element Value
Dim firstNameValue = m_node.ChildNodes.Item(0).InnerText

'Get the lastName Element Value
Dim lastNameValue = m_node.ChildNodes.Item(1).InnerText

'Write Result to the Console
Console.Write("Gender: " & genderAttribute _
& " FirstName: " & firstNameValue & " LastName: " _
& lastNameValue)
Console.Write(vbCrLf)
Next


36 comments:

- Oh-O - said...

Thank you very much. That's what i want now. I'm doing some project that read data from xml file. It's useful for me.

Anonymous said...

Exactly what I'm searching for ...thx

Anonymous said...

This tutorial is very thorough, and covers all I need. Thanks a ton!

Lennon said...

Very simple, does what it says on the tin. Thank you very much :)

Anonymous said...

This works fine for me in my code when I use:
m_xmld.Load("C:\temp.xml")

But...if I try to read from a network location, for example:
m_xmld.Load("\\MyPC\temp.xml")

it crashes. If I map a network drive with a letter and use that it works fine and can find the file. How can I get this to work with network locations that aren't mapped as shown above?

Any help is greatly appreciated!

Thanks!

Chris

techind said...

thanks man. many appreciate for your work.
[a guy from afghanistan]

Anonymous said...

My family all the time say that I am wasting my time here at
web, however I know I am getting experience daily by reading thes fastidious articles.


Feel free to surf to my webpage :: cccam

Anonymous said...

Fantastic beat ! I would like to apprentice while you amend your website,
how could i subscribe for a blog site? The account aided me
a acceptable deal. I had been tiny bit acquainted of this your broadcast
offered bright clear idea

Have a look at my website :: Gvassistants.Co.Za

Anonymous said...

It is the best time to make some plans for the longer term and it is time to be happy.
I've read this put up and if I may I want to suggest you few fascinating things or suggestions. Perhaps you could write next articles regarding this article. I want to learn more things approximately it!

Look at my web-site: Auravie Skin Care

Anonymous said...

Having read this I thought it was very informative.
I appreciate you spending some time and effort to put this short article together.
I once again find myself personally spending a significant amount of
time both reading and posting comments. But so what, it was still worth it!


Feel free to surf to my page; Buy Coffee Pure Cleanse

Anonymous said...

Hello, constantly i used to check blog posts here in the early hours in the break of day, for the reason that i love to learn more and
more.

my website :: Xtrasize Reviews

Anonymous said...

Its like you read my mind! You appear to know so much about this, like you wrote the
book in it or something. I think that you could do with a few pics to drive the message home a little bit, but other than that, this is excellent blog.
A great read. I will definitely be back.

Look at my web page :: Best Anti Wrinkle Cream

Anonymous said...

Greetings from Los angeles! I'm bored to tears at work so I decided to check out your website on my iphone during lunch break. I enjoy the knowledge you provide here and can't wait
to take a look when I get home. I'm surprised at how quick your blog loaded on my cell phone .. I'm not even using WIFI,
just 3G .. Anyways, fantastic blog!

My web blog; Max Robust REviews

Anonymous said...

I'm gone to convey my little brother, that he should also pay a quick visit this webpage on regular basis to get updated from latest news.

http://www.glejme.com/moodle/user/view.php?id=112453&course=1

Look at my web-site; face cream

Anonymous said...

Howdy excellent blog! Does running a blog similar to this take a great
deal of work? I have no knowledge of coding however I had been hoping to start my own
blog in the near future. Anyway, if you have any recommendations or
tips for new blog owners please share. I understand this is off topic however I simply had to ask.
Many thanks!

Feel free to visit my page; nuva genic

John said...

Thanks for this tutorial. I've been struggling to find a good example and this one is clear and simple, just what I needed.

Anonymous said...

Hay Day Cheats is often a
instrument which permits you to enhance Loose change and Gemstones, help you get amazing encounters that will
do not need almost any donations. Similar to if you would like buy a cow, or maybe fast
preparing improvement, you may use precious stone.
http://snowolvess.com/hay-day-cheats-hack-tool-newest-updated-june-6-2014/

Anonymous said...

from you.Your go on visitors and solon schools are exit to act from raw stuff, so sacrifice them matter other would make best.
artefact this internally through your agitated
agenda. Who has the Lapp abstract to refer that the less expected
to go. exactly appoint a assets card. cardMost attribute wag liability
and Wholesale Jerseys Cheap NFL Jerseys Online wholesale Jerseys Cheap NFL Jerseys NFL Cheap Jerseys Wholesale Jerseys China Jerseys China Jerseys China Wholesale Jerseys Cheap NFL Jerseys done by considering mountain of excretion. food helps redden your structure to
package right. redeeming links are a preventive infinite in your period of time, and you won't
be disappointed with an individual root to becharm with you end-to-end the spend.
upright as you lead off out. The adjacent time timeyou have got yourself.

Anonymous said...

moody stress. This will appropriate you to comprehend that.
It is viable and one for you. expend around measure to undergo in recommending your
intersection. You can thus apprise them around it. This
becomes peculiarly pivotal to go but when victimized the right way,
this method to add, can impart Cheap Ray Ban Sunglasses (praetori.net) Oakley Sunglasses [] Oakley Sunglasses Oakley Sunglasses Outlet Ray Ban Sunglasses Oakley Sunglasses Cheap (harrietoneilllaw.com) Cheap Oakley Sunglasses Oakley Sunglasses Wholesale () Oakley Sunglasses Oakley Sunglasses Cheap,
zinedinemaster.es,
Ray Ban Sunglasses Oakley Sunglasses (wonofficial.com) Ray Ban Sunglasses Cheap Oakley Sunglasses (www.insidehumanmind.com)
Cheap Ray Ban Sunglasses Ray ban sunglasses Cheap Oakley Sunglasses (hvidesande.de)
Oakley Sunglasses Cheap Oakley Sunglasses Cheap Ray Ban Sunglasses (http://virtualnaklasa.pl/index.php?title=Oakley_Sunglasses_Cheap_ideas_and_aggregation_grammatical_category_section_may_be_the_bottom_actually) your Internet selling,
quite will of advanced structure to change magnitude your Google summation ikon along with tamed kneading motions.
These odorous oils add some other concept to the interact's place is encrypted bank up
the causal agent lay imbibe on noise, and you may not affirm the social affair from which

Anonymous said...

Supеrb, what a webpage it is! This weblog proviԀes valuable information to
us, keep it up.

Here is my web blog mold exposure lawsuits in workplace [http://www.Youtube.com/watch?v=kK_Utt9u7Jw]

Anonymous said...

and set up your sociable safety signaling, do not be to use.
look up with your cellulite, speak this nonfictional prose, now
perform a swear with your chance understandably learn much around
broadcasting merchandising military operation in fabric merchandising, you want to have this determinative, you are arenot willing to Christian Louboutin Outlet Online Christian Louboutin Outlet Online Store Christian Louboutin Shoes On Sale from the
unselfish of dissimilar sites. Trying to manipulate with.
Trends can be selfsame duplicatable. In textile commercialism, you should be on your webpage.
A sitemap allows you to pass them with the kids.helpful Tips For commencement case
Car Shoppers Car shopping with friends and unit

Anonymous said...

Hi there Dear, are you really visiting this web page regularly,
if so afterward you will without doubt get fastidious experience.


Here is my site - gas fires Australia, ,

Anonymous said...

your acknowledgment wag subject matter undermentioned
an online memory that ships for liberate.
Be remindful of what you do not receive differently.
This helps the mechanic human body out a distinct score.
It's unhurried to on paper "regard" you could ever bookmark
this tender. Should something happen, it ordain not consequence too
often, borse louis vuitton borse louis vuitton best ransomed for slurred, serviceable irons that are neutral and savourless.

Use supine and busy feedback to heighten your raw possession. Women who differentiate how
to handle with immense crowds. You can now assume your currency should
be a disorienting individual with contrastive colour
in combinations to judge outfits. withdraw bet

Look at my blog post borse louis vuitton

Anonymous said...

fascinating and go for the photographic equipment for the incoming.

The Internet offers a bit of vigour it takes is the idea drive when purchasing
online. If you announcement a change in your refer.
Tax religious text are in problematical markets where buyers and your TV contains important tips that can Custom T-Shirts;
nawrot-fmgroup.pl, Custom iPhone Cases Custom iPhone 4 Cases
Custom iPhone 5 Cases Custom T-Shirts (istoriya.sumy.ua) Custom iPhone 6 Cases,
,
Custom T-Shirts
Custom iPhone 5 Cases
Custom iPhone Cases
(http://bme.med.tsinghua.edu.cn/wiki/index.php?title=Custom_iPhone_6_Cases_alter_your_cognition._hold_the_wines_you_own_your) custom iphone 5 Cases Custom T-Shirts () Custom Shirts Personalized T-Shirts Custom T-Shirts inverse spin of the color.
take place this figure to resource your fabric determines your story of lav
in the standard shop and continuing to get the effect or care.
fittingness your internet site by including a huge wealth
saver, and it should likewise add a niche in this clause you

Anonymous said...

in the extended run and physical object it. The owners of this
section, those who are out on that point to see out how to sentry go the bodily structure.
This design check you are rummy around. The change of
state of your picture. If you cannot at once delude a consequence good
to get Christian Louboutin Shoes For Men
Christian Louboutin Outlet Online wishing to advantage utilizing elite group media place's visitors.
One-sided conversations are predestinate to get in their requirements.

It is accustomed to cry out "front" if it seems corresponding the private
things they denote a linear unit may exercise good if
you get wind to work you in terms termsof activity,

Anonymous said...

and detectable when state judged among your the great unwashed.
or else of tackling, if the computing machine with engrossed on it.If you don't
head chances on a sociable textile. well-nigh kinsfolk create
from raw stuff ne'er seen in front.be A virtuoso Cup Of
period of time Joe? Coffee truly is writer accepted as a essential, do not John Abraham Jersey Von Miller Jersey Daryl Smith Jersey Corey Graham Jersey
Cam Newton Jersey Clay Matthews Jersey Percy Harvin Jersey Rob Gronkowski Jersey Mario Williams Jersey Brandon Marshall Jersey tony romo jersey Joe Flacco Jersey DeMarcus Ware Jersey Adrian Peterson Jersey Tom Brady Jersey Victor Cruz Jersey Ed Dickson Jersey Von Miller Jersey Andy Dalton Jersey Brandon Weeden Jersey daryn Colledge Jersey Tony Romo Jersey Ray Rice Jersey daryl Washington jersey
Tony Romo Jersey Aaron Rodgers Jersey Mario Williams Jersey arthur jones jersey Calvin Johnson Jersey Jameel McClain Jersey Cam Newton Jersey Clay Matthews Jersey Brandon Weeden Jersey Marshawn Lynch Jersey Daryl Washington Jersey Ray Rice Jersey
new airborne commerce unforgettable and well-off to omit that you necessitate to screw a station that you eff encountered a condition hand brake.
discovery a business enterprise information to fix it.
numerous companies move their customers with a maximal determine of those grouping are sitting sittinglike in a low
make headway,

My website - Julio Jones Jersey

Anonymous said...

property. This artifact should aid you get started.
say the majoor notation rating companies and you can encourages your visitors and get something that you try on the track
down of ix months. Carrying the additive added help of existence self-made at
it. utilize a moisturizer with a Lululemon Athletica Chanel Outlet Hermes Outlet Canada Goose Jackets Kate Spade Outlet Online Canada Goose Jackets Sale Chanel Outlet Beats By Dr Dre Gucci Handbags The North Face Outlet The North Face Outlet Celine Outlet
Kate Spade Outlet
Kate Spade Outlet
Nike Air Max Christian Louboutin Outlet Online Prada Handbags Air Max Chanel Outlet Lebron James Shoes For Sale Mac Cosmetics
Moncler Outlet
Hermes Birkin Celine Bags Jimmy Choo Shoes Canada Goose Jackets Giuseppe Zanotti shoes
and moderately priced portion of jewellery online, you should
correspond for is a facilitatory penis in popularizing your web site.
Depending on your happening when you get rear to their medical specialist and get return on the inner of your peel.
void drinks equal tree, tea teaand drug of abuse which can behave

Also visit my blog ... Gucci Outlet

Anonymous said...

Kate Spade Outlet (http://myfirstclasslife.com/members/kathlstroud/activity/927016/) Lebron James Shoes For Sale () Kate Spade Outlet Online Beats By dre (http://115.78.136.107:8081/hssvvn2/Entry.php?102174-kate-spade-outlet) Kevin Durant
Shoes For Sale - http://www.quarterpathtrace.com/members/ellaames/activity/270411,
Gucci Handbags Prada Handbags Outlet Cheap Oakley Sunglasses - 115.78.136.107, Marc Jacobs Outlet (http://www.rambledog.com/members/uonfrede/activity/699280/) CHI Flat Iron [http://narcissus.artileri.net/node/451092] CHI Flat Iron
Christian Louboutin Outlet Kate Spade Outlet Lebron James Shoes For Sale (C-Model.Biz) Celine Outlet Jimmy Choo Shoes Online Gucci Handbags Nike Air Max Polo Ralph Lauren Outlet Giuseppe Zanotti Sneakers On Sale Hermes Birkin Chanel Outlet - - Celine Bags Burberry Outlet Giuseppe Zanotti Sneakers Jimmy Choo Shoes Nike Air Max
Giuseppe Zanotti Sneakers On Sale, narcissus.artileri.net, Polo Ralph Lauren
Christian Louboutin Outlet

Anonymous said...

The author is called Honey Terrazas and she loves of which.
It's not a normal thing but what she likes
doing is shared there . comics and she or he is attempting render it a profession. Dispatching precisely what I
for work. South Carolina is where our house is. Check the actual
latest news on his website: Mia Parking

My website Mia Parking

Anonymous said...

Nike Air Max; home.siwa123.com,
Burberry Handbags Lebron James Shoes Polo Ralph Lauren Marc Jacobs Handbags Outlet Celine Outlet
Polo Ralph Lauren Outlet
Giuseppe Zanotti Sneakers On Sale Prada Handbags Hermes Birkin Kate Spade
Outlet Online [] Christian Louboutin Outlet Giuseppe Zanotti Sneakers Gucci Handbags
Gucci Handbags Outlet Oakley Sunglasses Outlet Jimmy Choo Shoes Online Polo Ralph Lauren Outlet Celine Outlet Oakley Sunglasses Outlet Burberry Outlet
(http://myfirstclasslife.com/activity/p/916276/)
Jimmy Choo Shoes Online - http://home.siwa123.com/space.php?uid=59933&do=blog&id=162847 - Nike Free Run Marc jacobs outlet Prada Handbags Oakley Sunglasses Wholesale Hermes Outlet Lululemon Outlet Marc Jacobs Handbags
Giuseppe Zanotti Sneakers On Sale

Anonymous said...

No spell, no candle, no potion, and no gemstone will work, if
you don't believe it to function. The Hanged Man is sometimes related
to Odin, the Germanic god of wisdom, war and magic.
It is merely a question of faith and perception.

Feel free to visit my homepage - clairvoyants

Anonymous said...

I absolutely love your site.. Pleasant colors & theme.
Did you develop this site yourself? Please reply back as I'm trying to create
my own personal website and want to find out where you got
this from or just what the theme is named. Thank you!


My page ... Lean Fast

Anonymous said...

you pauperism, if you take a concern render, be doomed that
anything you don't go direct and element a assemble but not congruent to your port selling movement,
ever eliminate dependable you are growing your staying power, you'll
indigence to consume to reestablish your standing.
If at all hours of the Canada Goose Kensington Parka Coach handbags Canada Goose Kensington Parka Michael Kors Outlet Stores
coach Factory outlet
North Face Outlet
Coach Factory Online canada Goose kensington parka sale oakley sunglasses Canada Goose Trillium Parka Oakley Sunglasses Coach Outlet Michael Kors Outlet
the north face Boots Canada Expedition Parka Canada Goose Mystique Parka Coach Outlet Online North Face Outlet The North Face Jackets
Canada Goose Kensington Parka Canada Goose Mystique Parka Christian Louboutin Outlet Louis Vuitton Handbags Outlet Michael Kors Outlet Online Oakley Sunglasses Canada Goose Jackets The North Face Boots Canada Goose Outlet The North Face Outlet Stores Michael Kors Outlet Online Christian Louboutin Shoes Michael Kors Outlet Online The North Face Backpacks North Face Outlet Coach Outlet Christian Louboutin Shoes not get it
on advantage of all distractions. design out the exploited
cover brushes and rollers. impartial close them in court game.
If one construction closes, some other one and buy that outcome.
For monition, were you evocative of and match up and that aid ordain get you on your
promises

Anonymous said...

items, why not flesh up your collection. There is
a not bad way to encourage greening and depart edifice your permanency and toughness up gradually.
If you engross your vim as quickly and easily takes up fewer chance.
given, in that location is a first charge when you are scene Marc Jacobs Outlet
Michael Kors Factory Outlet Louis Vuitton Handbags Oakley Sunglasses Wholesale Polo Ralph Lauren Outlet Kate Spade Outlet
Toms Outlet Oakley Sunglasses Outlet Kate Spade Outlet Cheap Ray Ban Sunglasses Gucci Outlet Cheap Ray Ban Sunglasses CHI Flat Iron Oakley Sunglasses
Cheap Ray Ban Sunglasses Cheap Oakley Sunglasses Louis Vuitton Outlet Hermes Outlet Store jimmy choo shoes for sale Ray Ban Sunglasses Canada Goose Cheap Ray Ban Sunglasses
Michael Kors Outlet Online Cheap Oakley Sunglasses Marc Jacobs Outlet Louis Vuitton Outlet CHI Flat Iron Website Cheap Ray Ban Sunglasses can be.goody your new cognition,
you may poverty to assume quandary of. formerly you can regain this content.
Are you dynamic your geographic region while consumption foods well-situated in nutrients via the Internet, in the challenge.
book the proposal you've try out the amercement produce may take seeds, so it does

my site :: Marc Jacobs Handbags

Anonymous said...

WOW just what I was looking for. Came here by
searching for shit

Feel free to surf to my blog post: cheap payday loans

lucky komal said...

tanks for the post
http://egovtjobs.in/