473,396 Members | 1,840 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,396 software developers and data experts.

Can someone show an example of how to read an XML file into an XMLDocument object?

The file might be called C:\\XMLFile1.xml

tia,
chance.

Apr 12 '07 #1
4 1143
"chance" <ch****@crwmail.comwrote in message
news:11*********************@d57g2000hsg.googlegro ups.com...
The file might be called C:\\XMLFile1.xml
XmlDocument xd = new XmlDocument();
xd.Load("C:\\XMLFile1.xml");

Apr 12 '07 #2
erm, what did you try? anything? Sounds oddly like homework, but...

XmlDocument doc = new XmlDocument;
doc.Load(@"C:\\XMLFile1.xml");

Marc

Apr 12 '07 #3
I just realised that you were the OP from the other recent basic xml
question. Don't get me wrong: a lot of people here *are* here
precisely to help people out when they get stuck, but as a matter of
courtesy could you at least *try something* first, and then let us
know where you get stuck? For instance, how about the following:

http://www.google.com/search?hl=en&q...an+XMLDocument

</rant>

Marc

Apr 12 '07 #4
On Apr 12, 2:11 pm, "Marc Gravell" <marc.grav...@gmail.comwrote:
I just realised that you were the OP from the other recent basic xml
question. Don't get me wrong: a lot of people here *are* here
precisely to help people out when they get stuck, but as a matter of
courtesy could you at least *try something* first, and then let us
know where you get stuck? For instance, how about the following:

http://www.google.com/search?hl=en&q...n+XML+file+int...

</rant>

Marc
sorry i was a bit tired and just realized i had another variable named
doc so that's why i was confused and = didn't catch that method...i'll
be more careful next time.

Apr 13 '07 #5

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

Similar topics

3
by: srijit | last post by:
Hello, Here is an example code of xml writer in Python+PythonNet, Ironpython and Boo. The codes look very similar. Regards, Srijit Python + PythonNet: import CLR
11
by: ajikoe | last post by:
Hello, I used Visual C# Standard Edition. I want to comment my program using xml commentary method, I don't know why if I use value and example tag, it is not working / showed in the html...
0
by: mortb | last post by:
My problem is with a XML file that resides on my windows 2003 web server. I have this user control which I include on every page in my applicaiton. The control makes it possible for the users to...
8
by: Alan Silver | last post by:
Hello, I have a need to read the web.config file from another web site. I am trying get the value of the "theme" attribute of the "pages" node. I initially tried to do this by loading the file...
2
by: Emmanuel | last post by:
Hi there, My client would like to process an xml file. the structure of which is as below. <xml> <stockitem> <releaseddate>.....date value...</releaseddate> <...aditional tags for additional...
0
by: XML newbie: Urgent pls help! | last post by:
I am using VB.Net. My program is to connect to a remote IPAddress. Once, it verifies the login information it should display the SessionID and enable some button . I appreciate your help and thanku...
10
by: Miro | last post by:
I wanted certain text boxes ( only certain ones ) to always be Trim'd so that spaces are not in the begining, nor the end of the text entered. I created my own "Handle ?" - i hope thats the...
7
by: =?Utf-8?B?VGFtbXkgTmVqYWRpYW4=?= | last post by:
Hi, I am using visual studio C# window and I have an xml file which I need to read that file using Object Oriented program. What codes I should use in my class to load and read that xml file....
4
by: =?Utf-8?B?U2VhbkluU2VhdHRsZQ==?= | last post by:
I have this xml: <Report p1:schemaLocation="Data_Feed http://server/reportserver?param1=foo&param2=bar" Name="Data Feed" xmlns:p1="http://www.w3.org/2001/XMLSchema-instance"...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
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
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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
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...
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,...

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.