loadTextResource

fnstring loadTextResource( string resolved, XmlResourcePolicy policy, XmlErrorCode forbiddenCode, XmlErrorCode ioErrorCode, string purpose, XmlLocation loc = XmlLocation.init) @safe

Loads a resource as text under policy.

Parameters

resolvedA resolved identifier (filesystem path, or URI).
policyLoading policy.
forbiddenCodeError code used when the policy forbids loading.
ioErrorCodeError code used for I/O failures.
purposeHuman-readable description (used in error messages).
locOptional location for error reporting.

Returns

The loaded resource as a UTF-8 string.

Throws

XmlException on forbidden access or I/O failures.
fnstring loadTextResource( string resolved, ref XmlResourceLoader loader, XmlErrorCode forbiddenCode, XmlErrorCode ioErrorCode, string purpose, XmlLocation loc = XmlLocation.init) @safe

Loads a resource as text using a pluggable loader.