NXmlAbstractParser Class Reference

NXmlAbstractParser class defines the basic operations for Xml data definition parsers. More...

Inheritance diagram for NXmlAbstractParser:

NObject NXmlParser NXmlSchemaParser

List of all members.

Public Types

enum  XmlSchema { XMLNOPARSING, XMLSCHEMA, XMLDTD }
 Enumerates the supported data defintion parsers. More...

Public Member Functions

 NXmlAbstractParser (void)
 Constructs a NXmlAbstractParser object.
virtual ~NXmlAbstractParser (void)
 Destroys a NXmlAbstractParser object.
void setEncoding (const NString &encoding)
 Sets the encoding of the document to be parsed.
NString getEncoding (void) const
 Gets the encoding set for the document to be parsed.
virtual void setDefinitionUrl (const NString &url)
 Sets the path/url to the definition data.
NString getDefinitionUrl (void) const
 Gets the path/url to the defintion data.
virtual xmlDocPtr parse (const NString &filename)=0
 Parse a Xml document.
virtual xmlDocPtr parse (const NString &buffer, const NString &url)=0
 Parse a Xml Document in memory.
virtual xmlDocPtr parse (const NFile *file, const NString &url)=0
 Parse a Xml Document pointed by a file object.

Protected Attributes

NString m_encoding
NString m_url


Detailed Description

NXmlAbstractParser class defines the basic operations for Xml data definition parsers.

Note:
Right now DTD and Xml Schema are the only 2 supported methods for xml data definition

This class is used internally only. DO NOT used on applications

Examples:

xmlreader.cpp.

Definition at line 42 of file nxmlabstractparser.h.


Member Enumeration Documentation

enum XmlSchema

Enumerates the supported data defintion parsers.

Enumerator:
XMLNOPARSING  Don't do any kind of schema parsing
XMLSCHEMA  Xml Schema
XMLDTD  DTD

Definition at line 47 of file nxmlabstractparser.h.


Member Function Documentation

void setEncoding ( const NString encoding  ) 

Sets the encoding of the document to be parsed.

Parameters:
encoding The name of the encoding of the document
Note:
The name of the encoding is, in fact, the acronymn that identifies it. For example: UTF-8, ISO-8859-1, ISO-8859-15, etc.

Definition at line 41 of file nxmlabstractparser.cpp.

References m_encoding.

NString getEncoding ( void   )  const

Gets the encoding set for the document to be parsed.

Returns:
The name of the encoding

Definition at line 46 of file nxmlabstractparser.cpp.

References m_encoding.

void setDefinitionUrl ( const NString url  )  [virtual]

Sets the path/url to the definition data.

Parameters:
url The url/path to the definition data

Definition at line 51 of file nxmlabstractparser.cpp.

References m_url.

Referenced by NXmlReader::load().

NString getDefinitionUrl ( void   )  const

Gets the path/url to the defintion data.

Returns:
The path/url to the definition data

Definition at line 56 of file nxmlabstractparser.cpp.

References m_url.

virtual xmlDocPtr parse ( const NString filename  )  [pure virtual]

Parse a Xml document.

Parameters:
filename Filename to the document to be parsed
Returns:
A xmlDocPtr pointing to the document

Implemented in NXmlParser, and NXmlSchemaParser.

Referenced by NXmlReader::load().

virtual xmlDocPtr parse ( const NString buffer,
const NString url 
) [pure virtual]

Parse a Xml Document in memory.

Parameters:
buffer The Xml Document to be parsed
url The path/url to the definition data
Todo:
Removes the param URL.
Returns:
A xmlDocPtr pointing to the document

Implemented in NXmlParser, and NXmlSchemaParser.

virtual xmlDocPtr parse ( const NFile file,
const NString url 
) [pure virtual]

Parse a Xml Document pointed by a file object.

Parameters:
file An open NFile object containing xml data
url The path/url to the definition data
Todo:
Removes the param URL.
Returns:
A xmlDocPtr pointing to the document

Implemented in NXmlParser, and NXmlSchemaParser.


Member Data Documentation

NString m_encoding [protected]

Document encoding

Definition at line 118 of file nxmlabstractparser.h.

Referenced by getEncoding(), NXmlParser::parse(), and setEncoding().

NString m_url [protected]

Document url

Definition at line 119 of file nxmlabstractparser.h.

Referenced by getDefinitionUrl(), NXmlSchemaParser::parse(), and setDefinitionUrl().


The documentation for this class was generated from the following files:
Generated on Wed Mar 5 23:10:37 2008 for NemesisUtilitiesSystem by  doxygen 1.5.4