From cadc16025827e59e44749f4f5990383aa3a21aa5 Mon Sep 17 00:00:00 2001 From: "Adam D. Ruppe" Date: Fri, 4 Apr 2014 16:35:17 -0400 Subject: [PATCH] strict method --- dom.d | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/dom.d b/dom.d index 2963c50..5a8a907 100644 --- a/dom.d +++ b/dom.d @@ -3488,6 +3488,12 @@ class Document : FileResource { parse(data, false, false, null); } + /// Parses well-formed UTF-8, case-sensitive, XML or XHTML + /// Will throw exceptions on things like unclosed tags. + void parseStrict(string data) { + parse(data, true, true); + } + Utf8Stream handleDataEncoding(in string rawdata, string dataEncoding, bool strict) { // gotta determine the data encoding. If you know it, pass it in above to skip all this. if(dataEncoding is null) { @@ -6029,6 +6035,12 @@ class Utf8Stream { +/ } +void fillForm(T)(Form form, T obj, string name) { + import arsd.database; + fillData((k, v) => form.setValue(k, v), obj, name); +} + + /* Copyright: Adam D. Ruppe, 2010 - 2013 License: Boost License 1.0.