August 2003
Beginner to intermediate
600 pages
12h 57m
English
XmlAttributes can be inserted into a document by using the SetAttribute method described earlier in this chapter. Alternatively, you can add them using the insertion methods on the XmlAttributeCollection class. The insertion methods, similar to the XmlNode insertion methods, are Append, Prepend, InsertBefore, and InsertAfter.
Append and Prepend add an XmlAttribute to the end of the attribute list and to the beginning of the attribute list, respectively. The methods return the XmlAttribute that was inserted. If there exists an attribute in the collection with the same name, then the original attribute is removed from the collection, and the new attribute is added. Listing 11.23 illustrates how to use ...
Read now
Unlock full access