[Mono-list] Error while run program
Israel Fdez Cabrera
israel@segurmatica.com
Tue, 3 Aug 2004 11:18:41 +0500
Check the following modifications to the example:
El Martes, 3 de Agosto de 2004 05:54 AM, Arx Henrique escribi=F3:
>
> this is the code:
>
> using System;
> using System.Xml;
>
> namespace DotNetXmlSample
> {
> public class XmlSample
> {
> static void Main(string[] args)
> {
> XmlDocument SampleDoc =3D new XmlDocument();
> XmlNode RootNode =3D null;
> XmlNode RegionNode =3D null;
> XmlNode RegionDescription =3D null;
> SampleDoc.Load("/home/ahcruz/teste.xml");
> RootNode =3D SampleDoc.DocumentElement;
if (RootNode =3D=3D null)
Console.WriteLine("here is your problem? malformed document?");
> RegionNode =3D RootNode.ChildNodes[0];
> RegionDescription =3D RootNode.SelectSingleNode("description");
> RegionDescription.InnerText =3D "Reeeeeealy fast";
> SampleDoc.Save("/home/ahcruz/teste_2.xml");
> }
> }
> }
>
> And this is the xml file
>
> <?xml version=3D"1.0"?>
> <links>
> <category xmlns=3D"prog">
> <address>one addres</address>
> <description>one description</description>
> </category>
> <category xmlns=3D"prog2">
> <address>two addres</address>
> <description>two description</description>
> </category>
> </links>
>
> thanks a lot of
>
> Arx Henrique
>
> _______________________________________________
> Mono-list maillist - Mono-list@lists.ximian.com
> http://lists.ximian.com/mailman/listinfo/mono-list
=2D-=20
Israel Fdez Cabrera
Usuario Linux: 270292
Ciudad La Habana, Cuba.
Segurmatica.
israel@segurmatica.com