Issue 26 in xmltool: Add set* methods for text and cdata

1 view
Skip to first unread message

codesite...@google.com

unread,
Apr 3, 2009, 11:36:13 AM4/3/09
to xml...@googlegroups.com
Status: Accepted
Owner: mathieu.carbou
Labels: Type-Enhancement Priority-High Milestone-Release2.9

New issue 26 by mathieu.carbou: Add set* methods for text and cdata
http://code.google.com/p/xmltool/issues/detail?id=26

Actually tehre are only get* and add* methods but we need also a method to
replace existing text / cdata nodes in the current node

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

codesite...@google.com

unread,
Apr 3, 2009, 12:18:14 PM4/3/09
to xml...@googlegroups.com

Comment #1 on issue 26 by mikenereson: Add set* methods for text and cdata
http://code.google.com/p/xmltool/issues/detail?id=26

Here is what I went with until this issue is resolved.

Node node = (Node) doc.getCurrentTag();
Node textNode = node.getChildNodes().item(0);

if (textNode == null) // the case when the node is empty
{
node.setTextContent(textValue);
}
else
{
textNode.setTextContent(textValue);

codesite...@google.com

unread,
Apr 4, 2009, 12:26:38 PM4/4/09
to xml...@googlegroups.com
Updates:
Status: Fixed

Comment #2 on issue 26 by mathieu.carbou: Add set* methods for text and
cdata
http://code.google.com/p/xmltool/issues/detail?id=26

Hi,

I've added several set* methods in the release 2.9. It should be synced to
maven
central repo in 1-2 days max.

Cheers,

Mat'

Reply all
Reply to author
Forward
0 new messages