Click here to Skip to main content
15,898,134 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi,

I am trying to understand the concept of XML file. I have gone through many articles and i am very much confused now!

First of all, i am confused if i should create a XML file through codebehind page and use xmlwriter to write in it OR should i directly open the XML file and write the contents in it?
I tried creating many XML files through codebehind and it gets created but i am unable to use them in AdRotator & RSS Feed.

I want to know how can i create XML file that has Url's of files in its child element.

I will be very thankful if anybody guide me in brief and clear my doubts.
Thanks in advance.
Posted
Updated 4-Jun-10 1:10am
v2
Comments
Sandeep Mewara 4-Jun-10 7:10am    
Please don't use text speak next time. Words like (plz, b, m, thru..), use proper and complete words.

Well you said you read many articles. I don't know what is confusing you. May be start from here.[^] and examples[^] here.

What is wrong with simple xml as follows

<?xml version="1.0">
<Tutotial>
  <Url>http://www.codeproject.com/</Url>  
</Tutotial>
 
Share this answer
 
Comments
fwr 5-Jun-10 1:42am    
Thanks for your reply.yesterday i was trying to use xml file in adrotator,i was creating xml file through codebehind page in asp.net,my program was run successfuly and created the xml file and save it in my project.But when i use it in add rotator through advertisement file by just browsing the xml file,it was not working.then i tried it through just simply open the xml file and typed my contents into it directly and browse this through advertisement file.it worked.But i want to know that when should i use codebehind page to create xml file i.e using XmlWriter and xmldocument etc. and in case when i need some updation in this then how can i do it.i have learned this W3Schools article and also know that xml is only for storing,transporting,structuring the information.Does it mean i simply open the xml form and directly write into it the structure of my contents.please answer my this doubt first.could you please send me your email id.
An XML file is text. What you do depends on your needs. I suggest buying a basic book on XML, because you appear to have no clue.
 
Share this answer
 
You can deal with xml by just adding namespace Imports System.xml;

if you want to read the xml content then just use XMLReader class
if you want to write the xml then just use xmlWriter class
you can also use XMLdocument for reading n writing purpose.

regards
koolprasad2003 :)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900