XmlResolver Class Referenceabstract

#include <Pt/Xml/XmlResolver.h>

Resolves external entities and DTDs. More...

Public Member Functions

virtual ~XmlResolver ()
 Destructor.
 
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...
 
InputSourceresolveInput (const Pt::String &publicId, const Pt::String &systemId)
 Returns an input source for the given IDs.
 

Protected Member Functions

 XmlResolver ()
 Default constructor.
 
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...
 
virtual InputSourceonResolveInput (const Pt::String &publicId, const Pt::String &systemId)=0
 Returns an input source for the given IDs.
 

Detailed Description

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.

Member Function Documentation

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.

virtual TextCodec<Char, char>* onResolveEncoding ( const ByteorderMark bom,
const XmlDeclaration decl 
)
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.