New Features
Element.SortAttrs method, which lexicographically sorts an
element's attributes by key.ReadSettings properties.
Entity for the support of custom entity maps.WriteSettings properties.
UseCRLF to allow the output of CR-LF newlines instead of the
default LF newlines. This is useful on Windows systems.Element.Text method now returns the concatenation of all consecutive
character data tokens immediately following an element's opening tag.Element.SetCData to replace the character data immediately
following an element's opening tag with a CDATA section.Element.CreateCData to create and add a CDATA section child
CharData token to an element.Element.CreateText to create and add a child text CharData token
to an element.NewCData to create a parentless CDATA section CharData token.NewText to create a parentless text CharData
token.CharData.IsCData to detect if the token contains a CDATA section.CharData.IsWhitespace to detect if the token contains whitespace
inserted by one of the document Indent functions.Element.SetText so that it replaces a run of consecutive
character data tokens following the element's opening tag (instead of just
the first one).Element.Tail method, which returns the text immediately
following an element's closing tag.Element.SetTail method, which modifies the text immediately
following an element's closing tag.Element.InsertChildAt method, which inserts a new child token
before the specified child token index.Element.RemoveChildAt method, which removes the child token at
the specified child token index.Element.Index method, which returns the element's index within
its parent element's child token list.Element.NamespaceURI method to return the namespace URI
associated with an element.Attr.NamespaceURI method to return the namespace URI
associated with an element.Attr.Element method to return the element that an attribute
belongs to.[local-name()='val'] to keep elements whose unprefixed tag matches
the desired value.[name()='val'] to keep elements whose full tag matches the desired
value.[namespace-prefix()='val'] to keep elements whose namespace prefix
matches the desired value.[namespace-uri()='val'] to keep elements whose namespace URI
matches the desired value.Bug Fixes
CharSetReader is now used to prevent failed parsing of XML
documents using certain encodings.
(Issue).Document.Indent and Document.IndentTabs functions no longer insert
empty string CharData tokens.Deprecated
Element
InsertChild method is deprecated. Use InsertChildAt instead.CreateCharData method is deprecated. Use CreateText instead.CharData
NewCharData method is deprecated. Use NewText instead.Changes
/ or // and begins its search from the element's document root.GetPath
and GetRelativePath
functions to the Element
type.Breaking changes
// is now interpreted as an absolute path.
Previously, it was interpreted as a relative path starting from the element
whose
FindElement
method was called. To remain compatible with this release, all paths
prefixed with // should be prefixed with .// when called from any
element other than the document's root.Initial release.