Created
January 3, 2016 15:21
-
-
Save BenjaminAbt/e446019a67a62a2d039a to your computer and use it in GitHub Desktop.
C# XML Tutorial - XmlDocument Create Simple Document
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
XmlDocument xmlDoc = new XmlDocument( ); | |
XmlElement xmlRoot = xmlDoc.CreateElement( "XMLRootName" ); | |
root.SetAttribute( "demo", "SchwabenCode" ); | |
XmlElement child = xmlDoc.CreateElement( "KindElement" ); | |
child.InnerText = "Dies ist ein BeispielText"; | |
xmlRoot.AppendChild( child ); | |
xmlDoc.AppendChild( xmlRoot ); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment