#include <Pt/Xml/XmlResolver.h>
Resolves external entities and DTDs. More...
Public Member Functions | |
| virtual | ~XmlResolver () |
| Destructor. | |
| InputSource * | resolveInput (const Pt::String &publicId, const Pt::String &systemId) |
| Returns an input source for the given IDs. | |
| void | releaseInput (InputSource *is) |
| Releases an input source resolved by this resolver. | |
| TextCodec< Char, char > * | resolveEncoding (const ByteorderMark &bom, const XmlDeclaration &decl) |
| Returns a text codec for an encoding string. More... | |
Protected Member Functions | |
| XmlResolver () | |
| Default constructor. | |
| virtual InputSource * | onResolveInput (const Pt::String &publicId, const Pt::String &systemId)=0 |
| Returns an input source for the given IDs. | |
| virtual void | onReleaseInput (InputSource *is)=0 |
| Releases an input source resolved by this resolver. | |
| virtual TextCodec< Char, char > * | onResolveEncoding (const ByteorderMark &bom, const XmlDeclaration &decl) |
| Returns a text codec for an encoding string. More... | |
The XmlResolver is used, for example by the XmlReader, to resolve external entites by their public or system ID to an input source. All input sources must be released with the same resolver by which they were created. Encoding strings can also be resolved to to text codecs by the standardised encoding names.
| TextCodec<Char, char>* resolveEncoding | ( | const ByteorderMark & | bom, |
| const XmlDeclaration & | decl | ||
| ) |
The returned codec will be treated like a stream facet by the caller, i.e. it will be deleted if its refcount is 0.
|
protectedvirtual |
The returned codec will be treated like a stream facet by the caller, i.e. it will be deleted if its refcount is 0.