string.loadTextResource
fn
string loadTextResource(
string resolved,
XmlResourcePolicy policy,
XmlErrorCode forbiddenCode,
XmlErrorCode ioErrorCode,
string purpose,
XmlLocation loc = XmlLocation.init) @safeLoads a resource as text under policy.
Parameters
resolved | A resolved identifier (filesystem path, or URI). |
policy | Loading policy. |
forbiddenCode | Error code used when the policy forbids loading. |
ioErrorCode | Error code used for I/O failures. |
purpose | Human-readable description (used in error messages). |
loc | Optional location for error reporting. |
Returns
The loaded resource as a UTF-8
Throws
XmlException on forbidden access or I/O failures.fn
string loadTextResource(
string resolved,
ref XmlResourceLoader loader,
XmlErrorCode forbiddenCode,
XmlErrorCode ioErrorCode,
string purpose,
XmlLocation loc = XmlLocation.init) @safeLoads a resource as text using a pluggable loader.