Skip to content
Snippets Groups Projects
Commit 7725bb12 authored by Alberto Massari's avatar Alberto Massari
Browse files

Take into account the fExpandEntityReferences setting [jira# 1303]

git-svn-id: https://svn.apache.org/repos/asf/xerces/c/trunk@176228 13f79535-47bb-0310-9956-ffa450edef68
parent 51d23b5e
No related branches found
No related tags found
No related merge requests found
...@@ -250,7 +250,8 @@ DOMNode* DOMNodeIteratorImpl::nextNode (DOMNode* node, bool visitChildren) { ...@@ -250,7 +250,8 @@ DOMNode* DOMNodeIteratorImpl::nextNode (DOMNode* node, bool visitChildren) {
// only check children if we visit children. // only check children if we visit children.
if (visitChildren) { if (visitChildren) {
//if hasChildren, return 1st child. //if hasChildren, return 1st child.
if (node->hasChildNodes()) { if ((fExpandEntityReferences || node->getNodeType()!=DOMNode::ENTITY_REFERENCE_NODE) &&
node->hasChildNodes()) {
result = node->getFirstChild(); result = node->getFirstChild();
return result; return result;
} }
...@@ -303,7 +304,8 @@ DOMNode* DOMNodeIteratorImpl::previousNode (DOMNode* node) { ...@@ -303,7 +304,8 @@ DOMNode* DOMNodeIteratorImpl::previousNode (DOMNode* node) {
// if sibling has children, keep getting last child of child. // if sibling has children, keep getting last child of child.
if (result->hasChildNodes()) { if (result->hasChildNodes()) {
while (result->hasChildNodes()) { while ((fExpandEntityReferences || result->getNodeType()!=DOMNode::ENTITY_REFERENCE_NODE) &&
result->hasChildNodes()) {
result = result->getLastChild(); result = result->getLastChild();
} }
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment