+ else if (varname.compare(0, 4, "env.") == 0)
+ {
+ if (flags & FLAG_NO_ENV)
+ throw CoreException("XML environment entity reference in file included with noenv=\"yes\"");
+
+ const char* envstr = getenv(varname.c_str() + 4);
+ if (!envstr)
+ throw CoreException("Undefined XML environment entity reference '&" + varname + ";'");
+
+ value.append(envstr);
+ }