<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comentarios para Doctor Cesharp</title>
	<atom:link href="http://doctorcesharp.wordpress.com/comments/feed/" rel="self" type="application/rss+xml" />
	<link>http://doctorcesharp.wordpress.com</link>
	<description>Programación en .NET</description>
	<lastBuildDate>Wed, 08 Apr 2009 22:32:07 +0000</lastBuildDate>
	<generator>http://wordpress.com/</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>Comentario de David en Insertando nodos en un XML</title>
		<link>http://doctorcesharp.wordpress.com/2008/02/20/insertando-nodos-en-un-xml/#comment-3</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 08 Apr 2009 22:32:07 +0000</pubDate>
		<guid isPermaLink="false">http://doctorcesharp.wordpress.com/2008/02/20/insertando-nodos-en-un-xml/#comment-3</guid>
		<description>Estoy intentando hacer esto pero solo me sobreescribe el XML con los nuevos datos que introduzco en los textbox

public void insertaNodo()
        {             
            XmlDocument xmlmio = new XmlDocument();
            xmlmio.Load((@&quot;c:\miXML.xml&quot;));  

            XmlNode nodo = xmlmio.DocumentElement;

            XmlElement uno    = xmlmio.CreateElement(&quot;Nombre&quot;);
            XmlText txtuno    = xmlmio.CreateTextNode(txtNombre.Text);
            XmlElement dos    = xmlmio.CreateElement(&quot;Apellido&quot;);
            XmlText txtdos    = xmlmio.CreateTextNode(txtApellido.Text);
            XmlElement tres   = xmlmio.CreateElement(&quot;Edad&quot;);
            XmlText txttres   = xmlmio.CreateTextNode(txtEdad.Text);
            XmlElement cuatro = xmlmio.CreateElement(&quot;Domicilio&quot;);
            XmlText txtcuatro = xmlmio.CreateTextNode(txtDomicilio.Text);

            XmlElement node = xmlmio.CreateElement(&quot;Cliente&quot;);

            node.AppendChild(uno);
            node.LastChild.AppendChild(txtuno);
            node.AppendChild(dos);
            node.LastChild.AppendChild(txtdos);
            node.AppendChild(tres);
            node.LastChild.AppendChild(txttres);
            node.AppendChild(cuatro);
            node.LastChild.AppendChild(txtcuatro);

            nodo.AppendChild(node);            
        }</description>
		<content:encoded><![CDATA[<p>Estoy intentando hacer esto pero solo me sobreescribe el XML con los nuevos datos que introduzco en los textbox</p>
<p>public void insertaNodo()<br />
        {<br />
            XmlDocument xmlmio = new XmlDocument();<br />
            xmlmio.Load((@&#8221;c:\miXML.xml&#8221;));  </p>
<p>            XmlNode nodo = xmlmio.DocumentElement;</p>
<p>            XmlElement uno    = xmlmio.CreateElement(&#8220;Nombre&#8221;);<br />
            XmlText txtuno    = xmlmio.CreateTextNode(txtNombre.Text);<br />
            XmlElement dos    = xmlmio.CreateElement(&#8220;Apellido&#8221;);<br />
            XmlText txtdos    = xmlmio.CreateTextNode(txtApellido.Text);<br />
            XmlElement tres   = xmlmio.CreateElement(&#8220;Edad&#8221;);<br />
            XmlText txttres   = xmlmio.CreateTextNode(txtEdad.Text);<br />
            XmlElement cuatro = xmlmio.CreateElement(&#8220;Domicilio&#8221;);<br />
            XmlText txtcuatro = xmlmio.CreateTextNode(txtDomicilio.Text);</p>
<p>            XmlElement node = xmlmio.CreateElement(&#8220;Cliente&#8221;);</p>
<p>            node.AppendChild(uno);<br />
            node.LastChild.AppendChild(txtuno);<br />
            node.AppendChild(dos);<br />
            node.LastChild.AppendChild(txtdos);<br />
            node.AppendChild(tres);<br />
            node.LastChild.AppendChild(txttres);<br />
            node.AppendChild(cuatro);<br />
            node.LastChild.AppendChild(txtcuatro);</p>
<p>            nodo.AppendChild(node);<br />
        }</p>
]]></content:encoded>
	</item>
	<item>
		<title>Comentario de David en Insertando nodos en un XML</title>
		<link>http://doctorcesharp.wordpress.com/2008/02/20/insertando-nodos-en-un-xml/#comment-2</link>
		<dc:creator>David</dc:creator>
		<pubDate>Wed, 08 Apr 2009 22:30:15 +0000</pubDate>
		<guid isPermaLink="false">http://doctorcesharp.wordpress.com/2008/02/20/insertando-nodos-en-un-xml/#comment-2</guid>
		<description>Como puedo agregar mas nodos si los datos provienen de texbox?? 
Este es mi codigo:

public void creaXML()
        {
            System.Xml.Linq.XDocument miXML = new XDocument(new XDeclaration(&quot;1.0&quot;, &quot;utf-8&quot;, &quot;yes&quot;),
                new XComment(&quot;Lista de Personal&quot;),
                new XElement(&quot;Personas&quot;,
                    new XElement(&quot;Cliente&quot;,
                    new XElement(&quot;Nombre&quot;, txtNombre.Text),
                    new XElement(&quot;Apellido&quot;, txtApellido.Text),
                    new XElement(&quot;Edad&quot;, txtEdad.Text.ToString()),
                    new XElement(&quot;Domicilio&quot;, txtDomicilio.Text))                   
                    )
                    );
            miXML.Save(@&quot;c:\miXML.xml&quot;);   
        }</description>
		<content:encoded><![CDATA[<p>Como puedo agregar mas nodos si los datos provienen de texbox??<br />
Este es mi codigo:</p>
<p>public void creaXML()<br />
        {<br />
            System.Xml.Linq.XDocument miXML = new XDocument(new XDeclaration(&#8220;1.0&#8243;, &#8220;utf-8&#8243;, &#8220;yes&#8221;),<br />
                new XComment(&#8220;Lista de Personal&#8221;),<br />
                new XElement(&#8220;Personas&#8221;,<br />
                    new XElement(&#8220;Cliente&#8221;,<br />
                    new XElement(&#8220;Nombre&#8221;, txtNombre.Text),<br />
                    new XElement(&#8220;Apellido&#8221;, txtApellido.Text),<br />
                    new XElement(&#8220;Edad&#8221;, txtEdad.Text.ToString()),<br />
                    new XElement(&#8220;Domicilio&#8221;, txtDomicilio.Text))<br />
                    )<br />
                    );<br />
            miXML.Save(@&#8221;c:\miXML.xml&#8221;);<br />
        }</p>
]]></content:encoded>
	</item>
</channel>
</rss>
