4 Replies - 605 Views - Last Post: 19 November 2009 - 08:54 AM Rate Topic: -----

#1 ho-ho  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 04-May 09

About xml document

Post icon  Posted 19 November 2009 - 08:04 AM

Hi, I wanted to know if it was possible to create a new xml document while reading an existing xml document and only display certain tags in the new xml document from the old one using c#.
Thanks.
string str = txtUrl.Text;
System.Xml.XmlDocument XMLDoc = new System.Xml.XmlDocument();
XMLDoc.Load(str);
XMLDoc.Save("C:\\Data.xml");


Is This A Good Question/Topic? 0
  • +

Replies To: About xml document

#2 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6092
  • View blog
  • Posts: 23,614
  • Joined: 23-August 08

Re: About xml document

Posted 19 November 2009 - 08:22 AM

Yes and yes. Go to MSDN and read about XmlReaders and the like.
Was This Post Helpful? 0
  • +
  • -

#3 Adkins  Icon User is offline

  • D.I.C Addict
  • member icon

Reputation: 66
  • View blog
  • Posts: 560
  • Joined: 27-October 09

Re: About xml document

Posted 19 November 2009 - 08:42 AM

:bananaman:

You could also read up on XSLT to do this from directly with XML. Otherwise, Jack was right, just read up on XMLReader and it's kind.
Was This Post Helpful? 0
  • +
  • -

#4 ho-ho  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 04-May 09

Re: About xml document

Posted 19 November 2009 - 08:46 AM

Thanks
Was This Post Helpful? 0
  • +
  • -

#5 ho-ho  Icon User is offline

  • D.I.C Head

Reputation: 5
  • View blog
  • Posts: 69
  • Joined: 04-May 09

Re: About xml document

Posted 19 November 2009 - 08:54 AM

I have one more question. I am trying to read the source page of this urL in an xml
http://houston.craig...g/jwl/index.rss
and than trying to read in a datagrid but without luck. Any other xml document, I can read in datagrid. If you could please take a look at it at the source page of above link. Thanks
Was This Post Helpful? 0
  • +
  • -

Page 1 of 1