xmlbuilder
Advanced tools
Changelog
[11.0.0] - 2019-02-18
Calling end()
with arguments no longer overwrites writer options. See #120.
Added writer state and customizable space and endline functions to help customize writer behavior. Also added openNode
and closeNode
functions to writer. See #193.
Fixed a bug where writer functions would not be called for nodes with a single child node in pretty print mode. See #195.
Renamed elEscape
to textEscape
in XMLStringifier
.
Fixed a bug where empty arrays would produce child nodes. See #190.
Removed the skipNullAttributes
option. null
attributes are now skipped by default. Added the keepNullAttributes
option in case someone needs the old behavior.
Removed the skipNullNodes
option. null
nodes are now skipped by default. Added the keepNullNodes
option in case someone needs the old behavior.
undefined
values are now skipped when converting JS objects.
Renamed stringify functions. See #194:
eleName
-> name
attName
-> name
eleText
-> text
Fixed argument order for attribute
function in the writer. See #196.
Added openAttribute
and closeAttribute
functions to writer. See #196.
Added node types to node objects. Node types and writer states are exported by the module with the nodeType
and writerState
properties.
Fixed a bug where array items would not be correctly converted. See #159.
Fixed a bug where mixed-content inside JS objects with #text
decorator would not be correctly converted. See #171.
Fixed a bug where JS objects would not be expanded in callback mode. See #173.
Fixed a bug where character validation would not obey document's XML version. Added separate validation for XML 1.0 and XML 1.1 documents. See #169.
Fixed a bug where names would not be validated according to the spec. See #49.
Renamed text
property to value
in comment and cdata nodes to unify the API.
Removed doctype
function to prevent name clash with DOM implementation. Use the dtd
function instead.
Removed dummy nodes from the XML tree (Those were created while chain-building the tree).
Renamed attributes
property to attribs
to prevent name clash with DOM property with the same name.
Implemented the DOM standard (read-only) to support XPath lookups. XML namespaces are not currently supported. See #122.
Changelog
[10.0.0] - 2018-04-26
Changelog
[9.0.4] - 2017-08-16
spacebeforeslash
writer option accepts true
as well as space char(s).Changelog
[9.0.3] - 2017-08-15
spacebeforeslash
writer option can now be used with XML fragments.