Topic
IC4NOTICE: developerWorks Community will be offline May 29-30, 2015 while we upgrade to the latest version of IBM Connections. For more information, read our upgrade FAQ.
No replies
SystemAdmin
SystemAdmin
265 Posts
ACCEPTED ANSWER

Pinned topic Insert text Node

‏2012-11-24T23:42:43Z |
Hi,

i want to insert text Node after an Element.

an idea how can i insert Text() after the Element "Element2"?

Thanks :-)
Maalej

<?xml version="1.0" encoding="UTF-8"?>
<purchaseOrder><element2>1</element2>e1<element2>2</element2>e2</purchaseOrder>

<xforms:group ref="/purchaseOrder">
<xforms:group id="103" ref="self::purchaseOrder">
<xforms:repeat nodeset="./node()self::* or self::text()">
<xforms:group ref="self::element2">
<xforms:input ref="self::element2">
<xforms:label>element2</xforms:label>
</xforms:input>
</xforms:group>

<xforms:group ref="self::text()">
<xforms:input ref="self::text()">
<xforms:label>text</xforms:label>
</xforms:input>
</xforms:group>

<xforms:trigger>
<xforms:label>Add element2</xforms:label>
<xforms:action ev:event="DOMActivate">
<xforms:insert nodeset="." origin="instance('T')/Prototyp/*"/>
</xforms:action>
</xforms:trigger>