Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/53

Click to flip

53 Cards in this Set

  • Front
  • Back
What class represents the basic object in a DOM tree?
XmlNode
When should the DOM be used for XML processing?
1. Changes to XML document structure

2. Modifying data held by a node
How can an XML file be validated after it is loaded into an XML document?
Use XmlDocument.Validate
How can an XML file be validated as it is loaded into an XML document?
Pass a schema validating XmlReader to XmlDocument.Load
What two methods can be used to insert new nodes before or after a referenced node in the DOM?
1. XmlNode.InsertBefore
2. XmlNode.InsertAfter
What two methods can be used to insert new nodes at the beginning or end of a list of child nodes of a referenced node?
1. XmlNode.PrependChild
2. XmlNode.AppendChild
How can new node types be created in the DOM?
The XmlDocument class has Create methods for all node types.
What method can be used to append an XmlAttribute node to the end of the attribute collection associated with an element?
XmlAttributeCollection.Append
What classes should be used to read XML as quickly and efficient as possible?
Classes derived from XmlReader
What method can be used to remove a specific child node from a referenced node?
XmlNode.RemoveChild
What method can be used to remove all child nodes from a referenced node?
XmlNode.RemoveAll
What methods can be used to remove attributes from a collection of attributes?
1. XmlAttributeCollection.Remove
2. XmlAttributeCollection.RemoveAll
3. XmlAttributeCollection.RemoveAt
What methods can be used to remove attributes from a referenced element node?
1. XmlElement.RemoveAllAttributes
2. XmlElement.RemoveAttribute
3. XmlElement.RemoveAttributeAt
What property can be used to modify or retrieve the XML markup representing only the child nodes of a referenced node?
XmlNode.InnerXml
What property can be used to retrieve the XML markup representing a referenced node and its child nodes?
XmlNode.OuterXml
What occurs when the value of an XmlNode is set on a referenced node that doesn't support this property?
An InvalidOperationEception is thrown.
What property can be used to change the markup of a referenced node's child nodes?
XmlNode.InnerXml
What occurs when an attempt is made to modify a read-only node?
An InvalidOperationEception is thrown.
What are the differences between XmlNode.InnerText and XmlNode.InnerXml?
1. When retrieving InnerText, markup is excluded, where InnerXml includes markup.

2. When modifying InnerText, all markup is escaped, where modifying InnerXml does not escape markup.
What property can be used to retrieve the next sibling of a referenced node?
XmlNode.NextSibling
What property can be used to retrieve the previous sibling of a referenced node?
XmlNode.PreviousSibling
What method can be used to save an XmlDocument?
XmlDocument.Save
What property can be used to retrieve the root element for an XML document?
XmlDocument.DocumentElement
What class represent an unordered collection of XML nodes that can be accessed by name or index?
XmlNamedNodeMap
What class represent an ordered collection of XML nodes that can be accessed index only?
XmlNodeList
What DOM event is fired when a node belonging to this document is about to be inserted into another node?
XmlDocument.NodeInserting
What DOM event is fired when a node belonging to this document has been inserted into another node?
XmlDocument.NodeInserted
What DOM event is fired when the Value of a node belonging to this document is about to be changed?
XmlDocument.NodeChanging
What DOM event is fired when the Value of a node belonging to this document has been changed?
XmlDocument.NodeChanged
What DOM event is fired when a node belonging to this document has been removed from its parent?
XmlDocument.NodeRemoved
What DOM event is fired when a node belonging to this document is about to be removed from the document?
XmlDocument.NodeRemoving
What class represents an XML declaration node?
XmlDeclaration
What property can be used to modify the encoding an XML declaration node?
XmlDeclarationNode.Encoding
What property can be used to modify the version an XML declaration node?
XmlDeclarationNode.Version
What are three characteristics of the XmlReader class?
1. XML Data is not cached
2. Provides forward only access
3. Provides read-only access
What method is the preferred mechanism for obtaining XmlReader instances?
XmlReader.Create
What new method can be used to read XML content as an object of the type specified?
XmlReader.ReadContentAs
What new methods are available to use when parsing XML content to CLR basic types?
XmlReader.ReadContentAs* methods
e.g. ReadContentAsBoolean
What class is used to specify the set of features you want to enable when creating an XmlReader object?
XmlReaderSettings
What property indicates if the current element has an empty element tag, when reading XML data?
XmlReader.IsEmptyElement
What property indicates if the current node is a start tag or an empty element tag?
XmlReader.IsStartElement
What method can be used to read the content of simple text-only XML elements?
XmlReader.ReadElementString
What property can be used to get the number of attributes on an element, when reading an XML file?
XmlReader.AttributeCount
What property can be used to get the value of an attribute, when reading an XML file?
XmlReader.GetAttribute
What does the indexer property of the XmlReader class do?
Provides access to the attributes of a node when the reader is positioned on a node that supports attributes.
What functionality does an XmlTextReader provide?
Enforces rules that XML must be well formed
What function does an XmlNodeReader provide?
Provides a reader that reads over an XML DOM document.
What setting can be used to create a schema validating XmlReader?
XmlReaderSetting.ValidationType = ValidationType.Schema
What event is raised in .Net 2.0 to indicate a validation error has occured?
XmlReaderSettings.ValidationEventHandler
What class is used to specify the set of features you want to enable on an XmlWriter object?
XmlWriterSettings
What method is used to create an instance of XmlWriter?
XmlWriter.Create
What three methods can be used to write element nodes to an XML file?
1. XmlWriter.WriteElementString
2. XmlWriter.WriteStartElement
3. XmlWriter.WriteNode
What three methods can be used to write attributes to an XML file?
1. XmlWriter.WriteAttributeString
2. XmlWriter.WriteStartAttribute
3. XmlWriter.WriteAttributes