Click here to Skip to main content
15,919,613 members
Home / Discussions / C#
   

C#

 
QuestionMSDN like help Pin
Tauseef A23-Mar-07 22:28
Tauseef A23-Mar-07 22:28 
AnswerRe: MSDN like help Pin
Stefan Troschuetz23-Mar-07 22:37
Stefan Troschuetz23-Mar-07 22:37 
QuestionIntellisence Pin
Kanjinghat23-Mar-07 20:44
Kanjinghat23-Mar-07 20:44 
AnswerRe: Intellisence Pin
Stefan Troschuetz23-Mar-07 22:42
Stefan Troschuetz23-Mar-07 22:42 
AnswerRe: Intellisence Pin
Mike Hankey23-Mar-07 23:18
mveMike Hankey23-Mar-07 23:18 
QuestionSystem.Xml Pin
thecodedemon23-Mar-07 19:43
thecodedemon23-Mar-07 19:43 
AnswerRe: System.Xml Pin
Stefan Troschuetz23-Mar-07 22:50
Stefan Troschuetz23-Mar-07 22:50 
GeneralRe: System.Xml Pin
thecodedemon24-Mar-07 4:24
thecodedemon24-Mar-07 4:24 
Ya, a few hours after I posted, after trying several different things, I figured it out. I'll post what I did, for anyone else having the same problem.

            XmlDocument doc = new XmlDocument();<br />
            XmlNode node1;<br />
            XmlNode node2;<br />
<br />
            // Initialize the Xml document with the root node.<br />
            doc.AppendChild( doc.CreateNode( XmlNodeType.Element,<br />
                            "XMLRoot", string.Empty ) );<br />
            <br />
            // make some more nodes<br />
            // an element node<br />
            node1 = doc.CreateNode( XmlNodeType.Element, "Element", null );<br />
<br />
            // a text node<br />
            node2 = doc.CreateTextNode( "Text" );<br />
            node2.InnerText = "A text node";<br />
            // add the text node to the element node<br />
            node1.AppendChild( node2 );<br />
<br />
            // and add the element node to the doc<br />
            doc.SelectSingleNode( "XMLRoot" ).AppendChild( node1 );<br />
<br />
            doc.Save( Console.Out );<br />
<br />
            /**************************<br />
             * produces the following output<br />
             * <br />
             *      <XMLRoot><br />
             *          < Element>A text node< /Element><br />
             *      </XMLRoot><br />
             * <br />
             ***************************/<br />


Apparently, nodes can only be added to Element nodes. I haven't worked much with XML, so perhaps this is obvious to others.

A soft glow comes from the pit in the darkness.
The clicking noise become faster - and louder.
A wind begins to stir up from the pit, as the
creature flexes it's wings, preparing for flight.
You stare into the pit, and hear a voice say
in your mind, "If you survive the encounter,
declare it to the world."

The Code Demon Rises.
GeneralRe: System.Xml Pin
Stefan Troschuetz24-Mar-07 4:44
Stefan Troschuetz24-Mar-07 4:44 
GeneralRe: System.Xml Pin
thecodedemon24-Mar-07 4:53
thecodedemon24-Mar-07 4:53 
GeneralRe: System.Xml Pin
Stefan Troschuetz24-Mar-07 5:11
Stefan Troschuetz24-Mar-07 5:11 
Questiontimer_tick Pin
yaminilatha23-Mar-07 18:27
yaminilatha23-Mar-07 18:27 
AnswerRe: timer_tick Pin
Christian Graus23-Mar-07 18:36
protectorChristian Graus23-Mar-07 18:36 
GeneralRe: timer_tick Pin
yaminilatha29-Mar-07 2:12
yaminilatha29-Mar-07 2:12 
QuestionBuilding Audio Apps Using C# Pin
mikepalma23-Mar-07 18:13
mikepalma23-Mar-07 18:13 
AnswerRe: Building Audio Apps Using C# Pin
Christian Graus23-Mar-07 18:35
protectorChristian Graus23-Mar-07 18:35 
QuestionNo overload for method take "0" arguments Pin
chitra4sat23-Mar-07 18:08
chitra4sat23-Mar-07 18:08 
AnswerRe: No overload for method take "0" arguments Pin
Christian Graus23-Mar-07 18:31
protectorChristian Graus23-Mar-07 18:31 
GeneralRe: No overload for method take "0" arguments Pin
chitra4sat23-Mar-07 19:21
chitra4sat23-Mar-07 19:21 
GeneralRe: No overload for method take "0" arguments Pin
abhinarulkar23-Mar-07 20:13
abhinarulkar23-Mar-07 20:13 
GeneralRe: No overload for method take "0" arguments Pin
chitra4sat23-Mar-07 20:31
chitra4sat23-Mar-07 20:31 
GeneralRe: No overload for method take "0" arguments Pin
Stefan Troschuetz23-Mar-07 23:37
Stefan Troschuetz23-Mar-07 23:37 
Questionbranching and skip logic Pin
econner23-Mar-07 16:37
econner23-Mar-07 16:37 
AnswerRe: branching and skip logic Pin
Christian Graus23-Mar-07 16:58
protectorChristian Graus23-Mar-07 16:58 
AnswerRe: branching and skip logic Pin
Leslie Sanford23-Mar-07 17:50
Leslie Sanford23-Mar-07 17:50 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.