on 12-14-2017 10:29 AM
Hello Experts,
In my scenario, i have created data type in which i have to read the value from attribute 'xmlns' name and the same needs to be populated in target attribute 'xmlns'.
Pi not able to hold data into source attribute 'xmlns' as attribute 'xmlns' not generating in test tab. Instead of xmlns if other name given then it holds value into it, but not for xmlns.
Same thing i tried through XSD as well but attribute with name 'xmlns' xsd tag not populating.
Please suggest a way for achieving the same.
Regards,
Samir
Hi Samir!
In XML attribute named "xmlns" is attended to introduce default namespace. You shouldn't use it as custom attribute in your structure.
Let me ask: why do you want to use it in your data type?
Regards, Evgeniy.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Evgeniy Kolmakov,
Actually i need to read two different or dynamic xml namespaces from single structure (2 XSD are concatined into single data type) and populate into target, source & target structure contains attribute name as 'xmlns'.
Regards,
Samir.
Hi,
Please read what is the significance of XMLNS first.
https://www.w3schools.com/xml/xml_namespaces.asp
This is what you are trying to achieve "xmlns:xmlns". You are trying to wrap/designate your xml element within "xmlns" itself. This is not allowed in XML world. Its a reserved keyword.
You can also relate it like, you are trying to use a primitive data type name itself in java (int, float etc.) for your variable name.
int int=8; //Wrong, not allowed, your compiler is confused
int a=8; //Correct, allowed, compiler is happy
Hope you would have understood the issue here.
Thanks,
Ambuj
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Samir,
As I understand, your problem is related to the fact that your attribute: "xmlns" is a special one - it defines an XML namespace. Why do you want to set/change the namespace in your mapping? If it's really necessary then you can do it in a java mapping, for example.
I'm curious how your test message looks like. Could you please press "Src" button and attach the screenshot?
Regards,
Andrzej
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Andrzej Filusz,
Please check attached screen hot of SRC tab.
At run time neither data is passing into attribute 'xmlns' nor reflecting field itself in target/ test.
Regards,
Samir.test2.jpg
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hello Samir,
Can you share the sample XML?.
you wish to read value for attribute named XMLNS?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
101 | |
13 | |
13 | |
11 | |
11 | |
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.