on 08-18-2008 2:00 PM
Hi Experts,
i have a basic doubt,
while creating the datatypes we have an option of creating the fields with an element or attribute,
when should i use element type for the field and when shuld i use attribute type for the fields which we define, so when i right click their we can able to insert either element or attribute, confusing which one to insert..
finally just define what is an element and attribute..
answers will be appreciated..
regards,
reddy
Hi...
Actually before w.r.t the usage of element and attribute u should aware what is an element and what is an attribute..
Element takes the occurence but where as the attribute takes the value as optional or required So, an element is an entity, and attribute is a property of an element..
Take an example as defined above as with car is an element and its color is an attribure
Try to create the elements and attributes, and try with differient posibilities in mapping and test the scenario u will be understanding what en element and attribute is..
regards,
Kishore
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Attributes are to recognise or validate the XML field in runtime as you can have two fields with same name but different attribute in XML source data. now in XI you can validate the actual field to be taken.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
Element : Elements that have a type cannot contain the sub fields(elements).
Attribute : Add attributes to elements. Attributes cannot usually have subnodes.
Check this link for more info
http://help.sap.com/saphelp_nw04s/helpdata/en/3b/d2a3f7a166514abb8cf5635b71974f/frameset.htm
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.
hi
<Parts uniqueId="10000">part1</Parts>
here in the above XML string Parts is element and uniqueId is attribute, if u find any XML data like this u have to define datatype with attribute and element
Thanks
Madhav
Note:points if useful
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.
Refer the below link
http://help.sap.com/saphelp_nw04s/helpdata/en/3b/d2a3f7a166514abb8cf5635b71974f/frameset.htm
Atributes are like properties of elements.
For eg if we describe a car
<car color = "red" make = "xxx">
Alto
</car>
here car is an element and color and make are attributes of car.
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.