| Gnome XML Library Reference Manual | |||
|---|---|---|---|
| <<< Previous Page | Home | Up | Next Page >>> |
#define extern const xmlChar* getPublicId (void *ctx); const xmlChar* getSystemId (void *ctx); void setDocumentLocator (void *ctx, xmlSAXLocatorPtr loc); int getLineNumber (void *ctx); int getColumnNumber (void *ctx); int isStandalone (void *ctx); int hasInternalSubset (void *ctx); int hasExternalSubset (void *ctx); void internalSubset (void *ctx, const xmlChar *name, const xmlChar *ExternalID, const xmlChar *SystemID); xmlEntityPtr getEntity (void *ctx, const xmlChar *name); xmlEntityPtr getParameterEntity (void *ctx, const xmlChar *name); xmlParserInputPtr resolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId); void entityDecl (void *ctx, const xmlChar *name, int type, const xmlChar *publicId, const xmlChar *systemId, xmlChar *content); void attributeDecl (void *ctx, const xmlChar *elem, const xmlChar *name, int type, int def, const xmlChar *defaultValue, xmlEnumerationPtr tree); void elementDecl (void *ctx, const xmlChar *name, int type, xmlElementContentPtr content); void notationDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId); void unparsedEntityDecl (void *ctx, const xmlChar *name, const xmlChar *publicId, const xmlChar *systemId, const xmlChar *notationName); void startDocument (void *ctx); void endDocument (void *ctx); void attribute (void *ctx, const xmlChar *fullname, const xmlChar *value); void startElement (void *ctx, const xmlChar *fullname, const xmlChar **atts); void endElement (void *ctx, const xmlChar *name); void reference (void *ctx, const xmlChar *name); void characters (void *ctx, const xmlChar *ch, int len); void ignorableWhitespace (void *ctx, const xmlChar *ch, int len); void processingInstruction (void *ctx, const xmlChar *target, const xmlChar *data); void globalNamespace (void *ctx, const xmlChar *href, const xmlChar *prefix); void setNamespace (void *ctx, const xmlChar *name); xmlNsPtr getNamespace (void *ctx); int checkNamespace (void *ctx, xmlChar *nameSpace); void namespaceDecl (void *ctx, const xmlChar *href, const xmlChar *prefix); void comment (void *ctx, const xmlChar *value); void cdataBlock (void *ctx, const xmlChar *value, int len); void xmlDefaultSAXHandlerInit (void); void htmlDefaultSAXHandlerInit (void); |
const xmlChar* getPublicId (void *ctx); |
Return the public ID e.g. "-//SGMLSOURCE//DTD DEMO//EN"
| ctx : | the user data (XML parser context) |
| Returns : | a xmlChar * |
const xmlChar* getSystemId (void *ctx); |
Return the system ID, basically URL or filename e.g. http://www.sgmlsource.com/dtds/memo.dtd
| ctx : | the user data (XML parser context) |
| Returns : | a xmlChar * |
void setDocumentLocator (void *ctx,
xmlSAXLocatorPtr loc); |
Receive the document locator at startup, actually xmlDefaultSAXLocator Everything is available on the context, so this is useless in our case.
| ctx : | the user data (XML parser context) |
| loc : | A SAX Locator |
int getLineNumber (void *ctx); |
Return the line number of the current parsing point.
| ctx : | the user data (XML parser context) |
| Returns : | an int |
int getColumnNumber (void *ctx); |
Return the column number of the current parsing point.
| ctx : | the user data (XML parser context) |
| Returns : | an int |
int isStandalone (void *ctx); |
Is this document tagged standalone ?
| ctx : | the user data (XML parser context) |
| Returns : | 1 if true |
int hasInternalSubset (void *ctx); |
Does this document has an internal subset
| ctx : | the user data (XML parser context) |
| Returns : | 1 if true |
int hasExternalSubset (void *ctx); |
Does this document has an external subset
| ctx : | the user data (XML parser context) |
| Returns : | 1 if true |
void internalSubset (void *ctx,
const xmlChar *name,
const xmlChar *ExternalID,
const xmlChar *SystemID); |
Does this document has an internal subset
| ctx : | the user data (XML parser context) |
| name : | |
| ExternalID : | |
| SystemID : |
xmlEntityPtr getEntity (void *ctx, const xmlChar *name); |
Get an entity by name
| ctx : | the user data (XML parser context) |
| name : | The entity name |
| Returns : | the xmlEntityPtr if found. |
xmlEntityPtr getParameterEntity (void *ctx, const xmlChar *name); |
Get a parameter entity by name
| ctx : | the user data (XML parser context) |
| name : | The entity name |
| Returns : | the xmlEntityPtr if found. |
xmlParserInputPtr resolveEntity (void *ctx, const xmlChar *publicId, const xmlChar *systemId); |
Special entity resolver, better left to the parser, it has more context than the application layer. The default behaviour is to NOT resolve the entities, in that case the ENTITY_REF nodes are built in the structure (and the parameter values).
| ctx : | the user data (XML parser context) |
| publicId : | The public ID of the entity |
| systemId : | The system ID of the entity |
| Returns : | the xmlParserInputPtr if inlined or NULL for DOM behaviour. |
void entityDecl (void *ctx,
const xmlChar *name,
int type,
const xmlChar *publicId,
const xmlChar *systemId,
xmlChar *content); |
An entity definition has been parsed
| ctx : | the user data (XML parser context) |
| name : | the entity name |
| type : | the entity type |
| publicId : | The public ID of the entity |
| systemId : | The system ID of the entity |
| content : | the entity value (without processing). |
void attributeDecl (void *ctx,
const xmlChar *elem,
const xmlChar *name,
int type,
int def,
const xmlChar *defaultValue,
xmlEnumerationPtr tree); |
An attribute definition has been parsed
| ctx : | the user data (XML parser context) |
| elem : | |
| name : | the attribute name |
| type : | the attribute type |
| def : | |
| defaultValue : | |
| tree : |
void elementDecl (void *ctx,
const xmlChar *name,
int type,
xmlElementContentPtr content); |
An element definition has been parsed
| ctx : | the user data (XML parser context) |
| name : | the element name |
| type : | the element type |
| content : | the element value (without processing). |
void notationDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId); |
What to do when a notation declaration has been parsed.
| ctx : | the user data (XML parser context) |
| name : | The name of the notation |
| publicId : | The public ID of the entity |
| systemId : | The system ID of the entity |
void unparsedEntityDecl (void *ctx,
const xmlChar *name,
const xmlChar *publicId,
const xmlChar *systemId,
const xmlChar *notationName); |
What to do when an unparsed entity declaration is parsed
| ctx : | the user data (XML parser context) |
| name : | The name of the entity |
| publicId : | The public ID of the entity |
| systemId : | The system ID of the entity |
| notationName : | the name of the notation |
void startDocument (void *ctx); |
called when the document start being processed.
| ctx : | the user data (XML parser context) |
void endDocument (void *ctx); |
called when the document end has been detected.
| ctx : | the user data (XML parser context) |
void attribute (void *ctx,
const xmlChar *fullname,
const xmlChar *value); |
Handle an attribute that has been read by the parser. The default handling is to convert the attribute into an DOM subtree and past it in a new xmlAttr element added to the element.
| ctx : | the user data (XML parser context) |
| fullname : | |
| value : | The attribute value |
void startElement (void *ctx,
const xmlChar *fullname,
const xmlChar **atts); |
called when an opening tag has been processed.
| ctx : | the user data (XML parser context) |
| fullname : | |
| atts : | An array of name/value attributes pairs, NULL terminated |
void endElement (void *ctx,
const xmlChar *name); |
called when the end of an element has been detected.
| ctx : | the user data (XML parser context) |
| name : | The element name |
void reference (void *ctx,
const xmlChar *name); |
called when an entity reference is detected.
| ctx : | the user data (XML parser context) |
| name : | The entity name |
void characters (void *ctx,
const xmlChar *ch,
int len); |
receiving some chars from the parser. Question: how much at a time ???
| ctx : | the user data (XML parser context) |
| ch : | a xmlChar string |
| len : | the number of xmlChar |
void ignorableWhitespace (void *ctx,
const xmlChar *ch,
int len); |
receiving some ignorable whitespaces from the parser. Question: how much at a time ???
| ctx : | the user data (XML parser context) |
| ch : | a xmlChar string |
| len : | the number of xmlChar |
void processingInstruction (void *ctx,
const xmlChar *target,
const xmlChar *data); |
A processing instruction has been parsed.
| ctx : | the user data (XML parser context) |
| target : | the target name |
| data : | the PI data's |
void globalNamespace (void *ctx,
const xmlChar *href,
const xmlChar *prefix); |
An old global namespace has been parsed.
| ctx : | the user data (XML parser context) |
| href : | the namespace associated URN |
| prefix : | the namespace prefix |
void setNamespace (void *ctx,
const xmlChar *name); |
Set the current element namespace.
| ctx : | the user data (XML parser context) |
| name : | the namespace prefix |
xmlNsPtr getNamespace (void *ctx); |
Get the current element namespace.
| ctx : | the user data (XML parser context) |
| Returns : |
int checkNamespace (void *ctx,
xmlChar *nameSpace); |
Check that the current element namespace is the same as the one read upon parsing.
| ctx : | the user data (XML parser context) |
| nameSpace : | the namespace to check against |
| Returns : |
void namespaceDecl (void *ctx,
const xmlChar *href,
const xmlChar *prefix); |
A namespace has been parsed.
| ctx : | the user data (XML parser context) |
| href : | the namespace associated URN |
| prefix : | the namespace prefix |
void comment (void *ctx,
const xmlChar *value); |
A comment has been parsed.
| ctx : | the user data (XML parser context) |
| value : | the comment content |
void cdataBlock (void *ctx,
const xmlChar *value,
int len); |
called when a pcdata block has been parsed
| ctx : | the user data (XML parser context) |
| value : | The pcdata content |
| len : | the block length |