You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by bu...@apache.org on 2001/09/26 17:01:54 UTC

DO NOT REPLY [Bug 3838] New: - IDOM Parser: whitespace reported as a TEXT child node by getChildNodes()

DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3838>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=3838

IDOM Parser: whitespace reported as a TEXT child node by getChildNodes()

           Summary: IDOM Parser: whitespace reported as a TEXT child node by
                    getChildNodes()
           Product: Xerces-C++
           Version: 1.5.1
          Platform: PC
        OS/Version: Windows NT/2K
            Status: NEW
          Severity: Major
          Priority: Other
         Component: DOM
        AssignedTo: xerces-c-dev@xml.apache.org
        ReportedBy: alok.mathur@technosoft.com


When I parse an XML file using the IDOM parser,
and query a node for its child nodes using 
IDOM_Node::getChildNodes(),
I get newlines reported as a TEXT child node
of the parent.

Example:
<?xml version="1.0" encoding="UTF-8"?>
<test>
    <test1 />
</test>

Here the node <test> reports 3 children - one for <test1>
and 2 other - one before and one after <test1>.

This is a very severe problem and requires me to check a
text node, trim off all newline and whitespace characters,
see if I have anything left, and eliminate it if its empty.

I saw a similar bug # 3257 that says IDOM reports whitespace
as a PI but for me, the type of the whitespace node returned
is TEXT_NODE.

---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org