RELEASE_NOTES
Release v1.1.0
New Features
New attribute helpers.
Added the
Element.SortAttrs
method, which lexicographically sorts anelement's attributes by key.
New
ReadSettings
properties.Added
Entity
for the support of custom entity maps.
New
WriteSettings
properties.Added
UseCRLF
to allow the output of CR-LF newlines instead of thedefault LF newlines. This is useful on Windows systems.
Additional support for text and CDATA sections.
The
Element.Text
method now returns the concatenation of all consecutivecharacter data tokens immediately following an element's opening tag.
Added
Element.SetCData
to replace the character data immediatelyfollowing an element's opening tag with a CDATA section.
Added
Element.CreateCData
to create and add a CDATA section childCharData
token to an element.Added
Element.CreateText
to create and add a child textCharData
tokento an element.
Added
NewCData
to create a parentless CDATA sectionCharData
token.Added
NewText
to create a parentless textCharData
token.
Added
CharData.IsCData
to detect if the token contains a CDATA section.Added
CharData.IsWhitespace
to detect if the token contains whitespaceinserted by one of the document Indent functions.
Modified
Element.SetText
so that it replaces a run of consecutivecharacter data tokens following the element's opening tag (instead of just
the first one).
New "tail text" support.
Added the
Element.Tail
method, which returns the text immediatelyfollowing an element's closing tag.
Added the
Element.SetTail
method, which modifies the text immediatelyfollowing an element's closing tag.
New element child insertion and removal methods.
Added the
Element.InsertChildAt
method, which inserts a new child tokenbefore the specified child token index.
Added the
Element.RemoveChildAt
method, which removes the child token atthe specified child token index.
New element and attribute queries.
Added the
Element.Index
method, which returns the element's index withinits parent element's child token list.
Added the
Element.NamespaceURI
method to return the namespace URIassociated with an element.
Added the
Attr.NamespaceURI
method to return the namespace URIassociated with an element.
Added the
Attr.Element
method to return the element that an attributebelongs to.
New Path filter functions.
Added
[local-name()='val']
to keep elements whose unprefixed tag matchesthe desired value.
Added
[name()='val']
to keep elements whose full tag matches the desiredvalue.
Added
[namespace-prefix()='val']
to keep elements whose namespace prefixmatches the desired value.
Added
[namespace-uri()='val']
to keep elements whose namespace URImatches the desired value.
Bug Fixes
A default XML
CharSetReader
is now used to prevent failed parsing of XMLdocuments using certain encodings.
(Issue).
All characters are now properly escaped according to XML parsing rules.
(Issue).
The
Document.Indent
andDocument.IndentTabs
functions no longer insertempty string
CharData
tokens.
Deprecated
Element
The
InsertChild
method is deprecated. UseInsertChildAt
instead.The
CreateCharData
method is deprecated. UseCreateText
instead.
CharData
The
NewCharData
method is deprecated. UseNewText
instead.
Release v1.0.1
Changes
Added support for absolute etree Path queries. An absolute path begins with
/
or//
and begins its search from the element's document root.
Breaking changes
A path starting with
//
is now interpreted as an absolute path.Previously, it was interpreted as a relative path starting from the element
whose
method was called. To remain compatible with this release, all paths
prefixed with
//
should be prefixed with.//
when called from anyelement other than the document's root.
[edit 2/1/2019]: Minor releases should not contain breaking changes.
Even though this breaking change was very minor, it was a mistake to include
it in this minor release. In the future, all breaking changes will be
limited to major releases (e.g., version 2.0.0).
Release v1.0.0
Initial release.
Last updated