* xmlNewEntity: * @doc: the document * @name: the entity name * @type: the entity type XML_xxx_yyy_ENTITY * @ExternalID: the entity external ID if available * @SystemID: the entity system ID if available * @content: the entity content * * Create a new entity, this differs from xmlAddDocEntity() that if * the document is NULL or has no internal subset defined, then an * unlinked ent
| 395 | * Returns a pointer to the entity or NULL in case of error |
| 396 | */ |
| 397 | xmlEntityPtr |
| 398 | xmlNewEntity(xmlDocPtr doc, const xmlChar *name, int type, |
| 399 | const xmlChar *ExternalID, const xmlChar *SystemID, |
| 400 | const xmlChar *content) { |
| 401 | if ((doc != NULL) && (doc->intSubset != NULL)) { |
| 402 | return(xmlAddDocEntity(doc, name, type, ExternalID, SystemID, content)); |
| 403 | } |
| 404 | if (name == NULL) |
| 405 | return(NULL); |
| 406 | return(xmlCreateEntity(doc, name, type, ExternalID, SystemID, content)); |
| 407 | } |
| 408 | |
| 409 | /** |
| 410 | * xmlGetEntityFromTable: |