aboutsummaryrefslogtreecommitdiffstats
path: root/lib/xmerl/include
diff options
context:
space:
mode:
authorAnthony Ramine <[email protected]>2010-12-07 17:28:56 +0100
committerLars Thorsen <[email protected]>2011-11-11 11:58:42 +0100
commit7fc95c00764fc13d2e3e676cca1a66be5d672c41 (patch)
treeccc9c449a581779dfc2593aebe7977ccb7643276 /lib/xmerl/include
parent64a41197d8d5a292348d38467b28a041a95c500b (diff)
downloadotp-7fc95c00764fc13d2e3e676cca1a66be5d672c41.tar.gz
otp-7fc95c00764fc13d2e3e676cca1a66be5d672c41.tar.bz2
otp-7fc95c00764fc13d2e3e676cca1a66be5d672c41.zip
Allow whole documents to be returned
Functions `xmerl_scan:file/2` and `xmerl_scan:string/2` now accepts a new option `{document, true}` to produce a whole document as a `xmlDocument` record instead of just the root element node. You may wonder why this would be useful, this option is the only way to get to the top-level comments and processing instructions without hooking through the customization functions. Those nodes are needed to implement [Canonical XML][c14n-xml] support. [c14n-xml]: http://www.w3.org/TR/2008/PR-xml-c14n11-20080129/ "Canonical XML"
Diffstat (limited to 'lib/xmerl/include')
-rw-r--r--lib/xmerl/include/xmerl.hrl1
1 files changed, 1 insertions, 0 deletions
diff --git a/lib/xmerl/include/xmerl.hrl b/lib/xmerl/include/xmerl.hrl
index fb9b00c73c..9c471c437f 100644
--- a/lib/xmerl/include/xmerl.hrl
+++ b/lib/xmerl/include/xmerl.hrl
@@ -155,6 +155,7 @@
declarations = [], % [{Name, Attrs}]
doctype_name,
doctype_DTD = internal, % internal | DTDId
+ document = false,
rules,
keep_rules = false, % delete (ets) tab if false
namespace_conformant = false, % true | false