From 7fc95c00764fc13d2e3e676cca1a66be5d672c41 Mon Sep 17 00:00:00 2001 From: Anthony Ramine Date: Tue, 7 Dec 2010 17:28:56 +0100 Subject: 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" --- lib/xmerl/include/xmerl.hrl | 1 + 1 file changed, 1 insertion(+) (limited to 'lib/xmerl/include/xmerl.hrl') 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 -- cgit v1.2.3