Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How can I turn a XML file into a xml string?
Message
De
15/02/2008 16:05:50
Cetin Basoz
Engineerica Inc.
Izmir, Turquie
 
 
À
15/02/2008 11:15:22
Information générale
Forum:
ASP.NET
Catégorie:
XML
Versions des environnements
Environment:
VB 8.0
OS:
Windows XP SP2
Divers
Thread ID:
01292996
Message ID:
01293085
Vues:
21
>Hi,
>
>How can I turn a XML file into a xml string.
>
>I have tried streamreader, xmltextreader, the output results only give me the text() part of xml file(all xml tags are not included).
>
>e.g. for a simple xml file:
>
>
>title1
>

>
>The output is only "title1", but I want the whole thing. Can anyone help as to how i get the whole file to be converted into a string unsing vb.net
>
>Thanks for the help in advance.
>
>Bilal.
using System;
using System.IO;

class test
{
  static void Main()
  {
     TextReader rdr = new StreamReader(@"C:\myPath\myxmlfile.xml");
      string content = rdr.ReadToEnd();
      rdr.Close();
      Console.WriteLine(content);
  }
}
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform