[ 
https://issues.apache.org/jira/browse/XERCESJ-778?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=18003519#comment-18003519
 ] 

Elliotte Rusty Harold commented on XERCESJ-778:
-----------------------------------------------

Per spec, "When a document is first made available via the DOM, there is only 
one Text node for each block of text." so if we're not doing that, it's a 
serious bug. Also possible that getNodeValue is broken here.

> getNodeValue on a Node.TEXT type of node truncates the returned value
> ---------------------------------------------------------------------
>
>                 Key: XERCESJ-778
>                 URL: https://issues.apache.org/jira/browse/XERCESJ-778
>             Project: Xerces2-J
>          Issue Type: Bug
>          Components: DOM (Level 3 Core)
>    Affects Versions: 2.5.0
>         Environment: Operating System: Windows NT/2K
> Platform: PC
>            Reporter: Marius Constantin
>
> I have an XML document which has a text node containing a Base64 encoded 
> string.
> Suppose that cipherNode is the Element node containing the encoded text, my 
> code does the following:
>  Node textNode = cipherNode.getFirstChild();
>  String cipherValue = ( (Text) textNode ).getNodeValue();
> always, cipherValue is a String of length 1690 (the value of the text node is 
> much larger). There are no special characters in the text value.
> Is this normal behavior? Why 1690? Is there a limitation of a text node's 
> value 
> size?
> THanks,
>  Marius



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to