on 11-28-2016 3:36 AM
I have a requirement where I need to achieve the functionality of Return As XML for an output of UDF. UDF outputs XML in string format where I am mapping to a cloned node ( Duplicate Subtree). UDF XML Output automatically encapsulating in CDATA where I require to be return As XML. Is there anyway I can achieve this. Appreciate for your response for the same.
Thank you,
Rao
Hi Rao!
You can try something like this:
UDF:
public String addSubTree(String inputTree, Container container) throws StreamTransformationException{
StructureNode node = (StructureNode)(container.getParameter("STRUCTURE_NODE"));
node.setPreValue(inputTree);
return "";
I've passed xml fragments as constants to simplify mapping. You should remove CDATA tag and xml header string from your source string and pass it as parameter to UDF.
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Evgeniy Kolmakov,
I am also facing the same issue.
Could you please help me on that.
Can you explain your udf how it will remove the [cdata ]tags in output xml.
Thanks
Kavitha
Hi Evgeniy,
This is awesome.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
86 | |
10 | |
10 | |
9 | |
7 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.