From 37c493a7f990a5354f4a3fdd2368fcc5461c4e97 Mon Sep 17 00:00:00 2001
From: "Unknown (aruna1)" <dev-null@apache.org>
Date: Tue, 19 Sep 2000 01:04:09 +0000
Subject: [PATCH] Changed hasChildnode() function to directly get the children
 information and avoid copying entity tree.

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@172398 13f79535-47bb-0310-9956-ffa450edef68
---
 src/dom/EntityReferenceImpl.cpp | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/src/dom/EntityReferenceImpl.cpp b/src/dom/EntityReferenceImpl.cpp
index 3dd09a1b6..49f816875 100644
--- a/src/dom/EntityReferenceImpl.cpp
+++ b/src/dom/EntityReferenceImpl.cpp
@@ -204,6 +204,9 @@ unsigned int EntityReferenceImpl::getLength()
 */
 bool EntityReferenceImpl::hasChildNodes()
 {
+#if 0
+    // defer this query for now. 
+    //There's lot of work to be done here before it can return the actual value.
     bool haskids=false;
     
     DocumentTypeImpl *doctype;
@@ -216,6 +219,9 @@ bool EntityReferenceImpl::hasChildNodes()
         haskids=entDef->hasChildNodes();
     
     return haskids;
+#endif
+
+    return firstChild!=null;
 }
 
 
-- 
GitLab