O'Reilly logo

Microsoft® .NET Compact Framework Kick Start by Ronnie Yates, Erik Rubin

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Creating Other Node Types

Of course, the XmlDocument class provides methods for creating every node type. Table 11.2 lists the additional System.Xml.XmlNodeTypes and their corresponding creation methods.

Table 11.2. Other XmlNodeTypes and Their Creation Methods
NODETYPECREATION METHOD
CDATACreateCDataSection(string data)
CommentCreateComment(string data)
DocumentFragmentCreateDocumentFragment()
EntityReferenceCreateEntityReference(string name)
ProcessingInstructionCreateProcessingInstruction(string target, string data)
WhitespaceCreateWhitespace(string ws)
TextCreateTextNode(string text)
SignificantWhitespaceCreateSignificantWhitespace(string ws)

The CreateEntityReference method must be handled with care. The method will accept any legal name that can ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required