diff --git a/doc.go b/doc.go index bede312..0a5c9f2 100644 --- a/doc.go +++ b/doc.go @@ -14,6 +14,10 @@ Related Packages: checkxml: github.com/clbanning/checkxml provides functions for validating XML data. Notes: + 2022.10.20: v2.6 - add NewMapForattedXmlSeq for XML docs formatted with whitespace character + 2021.02.02: v2.5 - add XmlCheckIsValid toggle to force checking that the encoded XML is valid + 2020.12.14: v2.4 - add XMLEscapeCharsDecoder to preserve XML escaped characters in Map values + 2020.10.28: v2.3 - add TrimWhiteSpace option 2020.05.01: v2.2 - optimize map to XML encoding for large XML docs. 2019.07.04: v2.0 - remove unnecessary methods - mv.XmlWriterRaw, mv.XmlIndentWriterRaw - for Map and MapSeq. 2019.07.04: Add MapSeq type and move associated functions and methods from Map to MapSeq. diff --git a/readme.md b/readme.md index 323a747..f46588a 100644 --- a/readme.md +++ b/readme.md @@ -42,6 +42,7 @@ For over a year I've wanted to refactor the XML-to-map[string]interface{} decode

Notices

+ 2022.10.20: v2.6 - add NewMapForattedXmlSeq for XML docs formatted with whitespace character 2021.02.02: v2.5 - add XmlCheckIsValid toggle to force checking that the encoded XML is valid 2020.12.14: v2.4 - add XMLEscapeCharsDecoder to preserve XML escaped characters in Map values 2020.10.28: v2.3 - add TrimWhiteSpace option diff --git a/xmlseq.go b/xmlseq.go index 9a21728..af89ef7 100644 --- a/xmlseq.go +++ b/xmlseq.go @@ -81,6 +81,8 @@ var NO_ROOT = NoRoot // maintain backwards compatibility // ERRORS: // 1. If a NoRoot error, "no root key," is returned, check the initial map key for a "#comment", // "#directive" or #procinst" key. +// 2. Unmarshaling an XML doc that is formatted using the whitespace character, " ", will error, since +// Decoder.RawToken treats such occurances as significant. See NewMapFormattedXmlSeq(). func NewMapXmlSeq(xmlVal []byte, cast ...bool) (MapSeq, error) { var r bool if len(cast) == 1 {