summaryrefslogtreecommitdiff
path: root/entities.c
diff options
context:
space:
mode:
authorDaniel Veillard <veillard@src.gnome.org>1998-10-27 06:21:04 +0000
committerDaniel Veillard <veillard@src.gnome.org>1998-10-27 06:21:04 +0000
commitccb096379ac43c44755023007ee1dc9e61fbeec7 (patch)
tree2a7970559dc201c4078e0cb11a2fe2d213e2d1ab /entities.c
parent11e0058a113fb5c39c1a6ae775d53a919fea79dd (diff)
downloadlibxml2-ccb096379ac43c44755023007ee1dc9e61fbeec7.tar.gz
Changed the internals a lot for DOM, entity support, slight changes of API,
more (if not all) formating of function comments, started documentation, Daniel.
Diffstat (limited to 'entities.c')
-rw-r--r--entities.c23
1 files changed, 23 insertions, 0 deletions
diff --git a/entities.c b/entities.c
index 5a788e61..351746ce 100644
--- a/entities.c
+++ b/entities.c
@@ -143,6 +143,29 @@ void xmlInitializePredefinedEntities(void) {
}
}
+/**
+ * xmlGetPredefinedEntity:
+ * @name: the entity name
+ *
+ * Check whether this name is an predefined entity.
+ *
+ * return values: NULL if not, othervise the entity
+ */
+xmlEntityPtr
+xmlGetPredefinedEntity(const CHAR *name) {
+ int i;
+ xmlEntityPtr cur;
+
+ if (xmlPredefinedEntities == NULL)
+ xmlInitializePredefinedEntities();
+ for (i = 0;i < xmlPredefinedEntities->nb_entities;i++) {
+ cur = &xmlPredefinedEntities->table[i];
+ if (!xmlStrcmp(cur->name, name)) return(cur);
+ }
+ return(NULL);
+}
+
+
/*
* xmlAddDtdEntity : register a new entity for this DTD.