[#BloombergLP-balxml-Reader-XmlResolverFunctor]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balxml.adoc[balxml]::xref:BloombergLP/balxml/Reader.adoc[Reader]::XmlResolverFunctor
:relfileprefix: ../../../
:mrdocs:

Type for a user&hyphen;supplied functor that opens an external XML resource&period;

== Synopsis

Declared in `&lt;balxml&lowbar;reader&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
typedef xref:bsl/function-0a.adoc[bsl::function&lt;StreamBufPtr(char const*, char const*)&gt;] XmlResolverFunctor;
----

== Description

The functor finds and opens an external resource for the specified `location` and&sol;or `namespaceUri` and returns that resource as a managed pointer to a stream&period; The `location` argument specifies the location of the external resource and is typically a filename or a URI, depending on the context&period; The `namespaceUri` argument always refers to the XML namespace of the entity to be resolved&period; A conforming functor returns an empty managed pointer if it cannot resolve the resource&period; For example, the reader may use a resolver to open an external entity, even if the reader does not do validation (see definition of `&lt;!ENTITY&gt;` in the XML standard)&period; Note that either argument can be NULL in situations where its value is not needed or can be computed from the other argument&period;


[.small]#Created with https://www.mrdocs.com[MrDocs]#
