System.Xml.XmlDocument.CreateWhitespace C# (CSharp) Method

CreateWhitespace() public method

public CreateWhitespace ( string text ) : XmlWhitespace
text string
return XmlWhitespace
        public virtual XmlWhitespace CreateWhitespace(string text)
        {
            return new XmlWhitespace(text, this);
        }

Usage Example

Example #1
0
        public void Save(Control murpleControl, string filename, PodGroup thisPodGroup)
        {
            StreamWriter streamWriter = new StreamWriter(filename);
            XmlWriter xmlWriter = XmlWriter.Create(streamWriter);

            XmlDocument document = new XmlDocument();
            document.AppendChild(document.CreateWhitespace("\n"));

            {
                XmlElement murpleElement = document.CreateElement("Murple");

                AddNewLine(document, murpleElement);

                foreach (KeyValuePair<System.Guid, Pod> thisPodPair in murpleControl.Pods)
                {
                    if(thisPodGroup.ContainsPod(thisPodPair.Key) == true)
                        AddPod(document, murpleElement, thisPodPair);
                }

                document.AppendChild(murpleElement);
            }

            document.Save(xmlWriter);
            streamWriter.Close();
        }
All Usage Examples Of System.Xml.XmlDocument::CreateWhitespace