on 07-26-2013 11:51 AM
Hello Gurus,
I need to generate below mapping for a field in mapping.
<filed></field>
If i pass a constant blank value then after mapping the output shown is </filed> which is excluded by target system.
Hence target system are requesting to send start tag and end tag without any value.
Thanks in advance.
Hi,
<filed></field> and </filed> are both the same. if u want same <filed></filed> you need to write Udf to achieve that on.
Thanks
srikanth
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
<filed></field> and </filed> are both the same. Your target techee would know it 🙂
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
as i suguest in my first post. mapthe field with a value (space, character,etc)
<field></field> and </field>is the same for fields with null values
Regards
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This is my few cents ...
If the XML tag element has value the syntax is
<field>some value </field>
If the element has no value then you should generate the tag element as
<field/>
so if you send the tag element syntax has <field/> all the xml parsers should accept. This is syntax rule. Even if you do mapping or any sort of manipulations it will pass only as <field/>
But if you send as </field> then it is wrong... You are missing the start tag.. and see where you miss it.
Hope that helps.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Try mapWithDefault node function
Regards,
Mani
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Hari,
Can you right-click on the payload and choose view source? If it is displaying as </filed> then it is the content of your XML. What you can do to transform it to <filed></filed> is to use Java/XSLT mapping. Even if in the view source the field is <filed></filed>, it could still display as </filed> in some browsers (e.g moni).
Hope this helps,
Mark
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Hari,
i believe both are same.
<filed></field>
</filed>
Did you check below link?
http://stackoverflow.com/questions/7238254/xml-what-is-this-null-or-empty-element
else you can use mapWithDefault to pass some constant value to target field.
Regards,
Muniyappan.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
hi
you have to know that <filed></field> is the same as </field> so if you need to generate the node to be sent to tha backend maybe you can think about send an space in the field for example.
Regards
Rodrigo
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
93 | |
10 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.