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 "Vu Nguyen (JIRA)" <xe...@xml.apache.org> on 2005/02/24 01:42:54 UTC

[jira] Created: (XERCESC-1355) DOMBuilder parse wrong node type

DOMBuilder parse wrong node type
--------------------------------

         Key: XERCESC-1355
         URL: http://issues.apache.org/jira/browse/XERCESC-1355
     Project: Xerces-C++
        Type: Bug
  Components: DOM  
    Versions: 2.6.0    
 Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
    Reporter: Vu Nguyen


Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.

Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.


==================== OUTPUT LOG =========================
Building CLI tree from data model ... 
Element: command-groups 
        Attributes 
        ---------- 
        id=_1 
        name=bulk-input 
Rootnode has child: 1 
Element: help = (null) with type 1 
Element: command = (null) with type 1 
        Attributes 
        ---------- 
        id=_1 
        name=show 
Element: command = (null) with type 1 
        Attributes 
        ---------- 
        id=_2 
        name=start 
Node type == 1 
Element: help and value (null) at 0 
Node type == 3 
we done 
=============================================================
Note that: help is a text node and expected to return some value.




Here the sample of xml and dtd.



-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Vu Nguyen (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=comments#action_59734 ]
     
Vu Nguyen commented on XERCESC-1355:
------------------------------------

I definitely have problem with sending the attach files. Anywa, i sent you all needed files this morning and just did again just in case. Looking forward for your findind.

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen

>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Updated: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=history ]

Alberto Massari updated XERCESC-1355:
-------------------------------------

    Attachment: testcase.zip

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen
>  Attachments: testcase.zip
>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=comments#action_59713 ]
     
Alberto Massari commented on XERCESC-1355:
------------------------------------------

To attach a file to this bug entry, you should click on the "Attach file to this issue" link in the left pane. If you have problems you can also send it to me by e-mail.

Alberto

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen

>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Vu Nguyen (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=comments#action_59685 ]
     
Vu Nguyen commented on XERCESC-1355:
------------------------------------

Sorry, getNodeType always returns 1. The only nodes whose type = 3 are all inserted by DOMBuilder even though I do setFeature(whiteSpaceInElementContent = true.

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen

>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=comments#action_59693 ]
     
Alberto Massari commented on XERCESC-1355:
------------------------------------------

Could you attach the XML and the code you use to initialize the parser? It's hard for us to guess what's wrong here...

Alberto

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen

>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Commented: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Vu Nguyen (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=comments#action_59712 ]
     
Vu Nguyen commented on XERCESC-1355:
------------------------------------

The attachement is not sent at all. Can anyone assist me to ? 

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen

>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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


[jira] Resolved: (XERCESC-1355) DOMBuilder parse wrong node type

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ http://issues.apache.org/jira/browse/XERCESC-1355?page=history ]
     
Alberto Massari resolved XERCESC-1355:
--------------------------------------

    Resolution: Invalid

There is a programming error in the code, inside buildCLISubTree: the call to 

buildCLISubTree(n->getNextSibling(), depth++);

should be done also for elements, or you will only navigate through the first child element, skipping its sibling. 

Once I fixed this, I got this output, that I believe is what you want to obtain:

Building CLI tree from data model ...
Element: cli-model
        Attributes
        ----------
        id=_1
        name=bulk-input
Rootnode has child: 1
Element: help = (null) with type 1
Element: command = (null) with type 1
        Attributes
        ----------
        id=_1
        name=show
Element: command = (null) with type 1
        Attributes
        ----------
        id=_2
        name=start
Node type == 1
Element: help and value (null) at 0
Node type == 3
Element: #text and value "BulkInputService" at 0
Node type == 1
Element: command and value (null) at 1
        Attributes
        ----------
        id=_1
        name=show
Node type == 1
Element: help and value (null) at 1
Node type == 3
Element: #text and value "Show a Command" at 1
Node type == 1
Element: flags and value (null) at 2
Node type == 3
Element: #text and value "tada" at 2
Node type == 1
Element: callback and value (null) at 3
Node type == 3
Element: #text and value "GenericCallbackHandler" at 3
Node type == 1
Element: description and value (null) at 4
Node type == 3
Element: #text and value "Tada" at 4
Node type == 1
Element: parameter-set and value (null) at 5
Node type == 1
Element: parameter and value (null) at 5
        Attributes
        ----------
        id=_2
        name=all
Node type == 1
Element: data and value (null) at 5
        Attributes
        ----------
        type=KEYWORD
Node type == 1
Element: size and value (null) at 5
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: flags and value (null) at 2
Node type == 3
Element: #text and value "tada" at 2
Node type == 1
Element: callback and value (null) at 3
Node type == 3
Element: #text and value "GenericCallbackHandler" at 3
Node type == 1
Element: description and value (null) at 4
Node type == 3
Element: #text and value "Tada" at 4
Node type == 1
Element: parameter-set and value (null) at 5
Node type == 1
Element: parameter and value (null) at 5
        Attributes
        ----------
        id=_2
        name=all
Node type == 1
Element: data and value (null) at 5
        Attributes
        ----------
        type=KEYWORD
Node type == 1
Element: size and value (null) at 5
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: callback and value (null) at 3
Node type == 3
Element: #text and value "GenericCallbackHandler" at 3
Node type == 1
Element: description and value (null) at 4
Node type == 3
Element: #text and value "Tada" at 4
Node type == 1
Element: parameter-set and value (null) at 5
Node type == 1
Element: parameter and value (null) at 5
        Attributes
        ----------
        id=_2
        name=all
Node type == 1
Element: data and value (null) at 5
        Attributes
        ----------
        type=KEYWORD
Node type == 1
Element: size and value (null) at 5
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 4
Node type == 3
Element: #text and value "Tada" at 4
Node type == 1
Element: parameter-set and value (null) at 5
Node type == 1
Element: parameter and value (null) at 5
        Attributes
        ----------
        id=_2
        name=all
Node type == 1
Element: data and value (null) at 5
        Attributes
        ----------
        type=KEYWORD
Node type == 1
Element: size and value (null) at 5
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 5
Node type == 1
Element: parameter and value (null) at 5
        Attributes
        ----------
        id=_2
        name=all
Node type == 1
Element: data and value (null) at 5
        Attributes
        ----------
        type=KEYWORD
Node type == 1
Element: size and value (null) at 5
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: help and value (null) at 6
Node type == 3
Element: #text and value "show everything" at 6
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: flags and value (null) at 7
Node type == 1
Element: description and value (null) at 7
Node type == 3
Element: #text and value "Tada" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: parameter-set and value (null) at 6
Node type == 1
Element: parameter and value (null) at 6
        Attributes
        ----------
        id=_3
        name=bulk-input-name
Node type == 1
Element: data and value (null) at 6
        Attributes
        ----------
        type=STRING
Node type == 1
Element: size and value (null) at 6
Node type == 3
Element: #text and value "12" at 6
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "specific bulk-name" at 7
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: description and value (null) at 8
Node type == 3
Element: #text and value "Tada" at 8
Node type == 1
Element: command and value (null) at 7
        Attributes
        ----------
        id=_2
        name=start
Node type == 1
Element: help and value (null) at 7
Node type == 3
Element: #text and value "start a bulk service" at 7
Node type == 1
Element: flags and value (null) at 8
Node type == 1
Element: callback and value (null) at 8
Node type == 3
Element: #text and value "GenericCallbackHandler" at 8
Node type == 1
Element: description and value (null) at 9
Node type == 1
Element: flags and value (null) at 8
Node type == 1
Element: callback and value (null) at 8
Node type == 3
Element: #text and value "GenericCallbackHandler" at 8
Node type == 1
Element: description and value (null) at 9
Node type == 1
Element: callback and value (null) at 9
Node type == 3
Element: #text and value "GenericCallbackHandler" at 9
Node type == 1
Element: description and value (null) at 10
Node type == 1
Element: description and value (null) at 10
cli.xml: 10 ms (0 elems).


Alberto

> DOMBuilder parse wrong node type
> --------------------------------
>
>          Key: XERCESC-1355
>          URL: http://issues.apache.org/jira/browse/XERCESC-1355
>      Project: Xerces-C++
>         Type: Bug
>   Components: DOM
>     Versions: 2.6.0
>  Environment: Linux gcc 3.2 Redhat Linux 8.0 3.2-7
>     Reporter: Vu Nguyen
>  Attachments: testcase.zip
>
> Basically I wrote a simple code (similar to DOMCount) to printout the DOM tree content. I found out that all of the node type (node.getNodeType()) always return  3(which is ELEMENT_NODE) while it should sometimes return TEXT_NODE so I can obtain the value via node.getNodeValue(). As the result, I always get NULL.
> Not sure if related to this thing, before setFeature(...whitespace = true), the DOMTree has a lot of bogus TEXT_NODEs.
> ==================== OUTPUT LOG =========================
> Building CLI tree from data model ... 
> Element: command-groups 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=bulk-input 
> Rootnode has child: 1 
> Element: help = (null) with type 1 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_1 
>         name=show 
> Element: command = (null) with type 1 
>         Attributes 
>         ---------- 
>         id=_2 
>         name=start 
> Node type == 1 
> Element: help and value (null) at 0 
> Node type == 3 
> we done 
> =============================================================
> Note that: help is a text node and expected to return some value.
> Here the sample of xml and dtd.

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
   http://issues.apache.org/jira/secure/Administrators.jspa
-
If you want more information on JIRA, or have a bug to report see:
   http://www.atlassian.com/software/jira


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