THIS IS A TEST INSTANCE. ALL YOUR CHANGES WILL BE LOST!!!!
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature"> <property name="inAppendElements"> <map> <!-- append new simple "thebook" element with a text value '2' before "the "book" element --> <entry key="book" value="thebook=2"/> </map> </property> </bean> |
...
Code Block | ||||
---|---|---|---|---|
| ||||
<bean id="transformFeature" class="org.apache.cxf.feature.StaxTransformFeature"> <property name="inAppendElements"> <map> <!-- append new simple "thebook" element with a text value '2' afterusing the "/" convention as the book", using a '/' convention last child element within the "book" element --> <entry key="book/" value="thebook=2"/> </map> </property> </bean> |
Comparing four append modes
input | append-pre-wrap
| append-post-wrap | append-pre-include | append-post-include |
---|---|---|---|---|
key="book" value="thebook" | key="book/" value="thebook" | key="book" value="thebook=2" | key="book/" value="thebook=2" | |
<sales> | <sales> | <sales> | <sales> | <sales> |
Replacing text content
It's possible to replace the text content of a given simple element only on the input and output, for example:
...