on 07-31-2008 4:35 PM
Hi All,
I have a question, it might be a very basic question for you guys but please help me. I have to create a data type in xi to attain the following xml structure. Please let me know how to do it.
<Row>
<Field name="NAME" value="" />
<Field name="AGE" value="" />
<Field name="EMAIL" value="" />
<Field name="PHONE" value="" />
</Row>
Thanks in advance
Create Data Type Row
Insert Element Field -- occurences - 0..unbounded
Insert Attributes - Name, Value
Thanks,
Beena.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The problem is solved. Thank you guys for all the quick replies. I have created a Element Field and attributes name and value.
And then duplicated the subtree in the mapping, coz this was the only way i could solve the problem.In data type I cannot create multiple elements with same name.
Thanks again. I have awarded the points.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Steps to be followed in the creation of datatype
<Row>
<Field name="NAME" value="" />
<Field name="AGE" value="" />
<Field name="EMAIL" value="" />
<Field name="PHONE" value="" />
</Row>
1) Right click on the datatype and provide a name for it.
2) Now a screen appears where we can edit thw data type structure as we need.
3) Create the root element Row by adding the a new row.Dont specify Type for it.
4) Right click on the root element and choose insert subelement.Create Field.dont specify type.
5) Right click on the above created subelement ,choose insert attributes.Create name.Specify type.
6) Repeat the above step to create the value attribute also.
Specify type.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi
The Nodes which you have created is your field name and you can give your default value in the DEFAULT TAB. if there is no data , then leave it blank
Thanks
Saiyog
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
You want to create the data type of that structure ? if yes
Then
Select your component version --> Interface objects --> data types --> right click say new --> Give any name
Add the fields(One icon is with + select Insert subelement)
Name : Name
Type : String
Occurance : 1 or n (according to ur requirement)
Again click on Add the fields button(now you select insert element)
Name : Age
Type : integer
Occurance : 1 or n (according to ur requirement)
Again click on Add the fields button(now you select insert element)
Name : Email
Type : String
Occurance : 1 or n (according to ur requirement)
Again click on Add the fields button(now you select insert element)
Name : Phone
Type : integer
Occurance : 1 or n (according to ur requirement)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
check this xsd:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="http://reliant.com/xi/BDRC" targetNamespace="http://reliant.com/xi/BDRC">
<xsd:complexType name="row">
<xsd:sequence>
<xsd:element name="field" minOccurs="0" maxOccurs="unbounded">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4db854d05f1911ddb25d00065bb3316c
</xsd:appinfo>
</xsd:annotation>
<xsd:complexType>
<xsd:simpleContent>
<xsd:extension base="xsd:string">
<xsd:attribute name="name" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4db9db705f1911ddc2d000065bb3316c
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
<xsd:attribute name="value" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
4db9db715f1911dd905900065bb3316c
</xsd:appinfo>
</xsd:annotation>
</xsd:attribute>
</xsd:extension>
</xsd:simpleContent>
</xsd:complexType>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Hi,
This is the XSD file, after create the Data structure you select the XSD tab in IR then it automatically generates the XSD file.
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns="urn:tmo:pi:test" targetNamespace="urn:tmo:pi:test">
<xsd:complexType name="a_dt">
<xsd:sequence>
<xsd:element name="name" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8bae4ce05f1911ddb71900065b7eae37
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="age" type="xsd:integer">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8bb15a205f1911ddc59000065b7eae37
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="email" type="xsd:string">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8bb15a215f1911ddb2c000065b7eae37
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
<xsd:element name="phone" type="xsd:integer">
<xsd:annotation>
<xsd:appinfo source="http://sap.com/xi/TextID">
8bb15a225f1911ddc47e00065b7eae37
</xsd:appinfo>
</xsd:annotation>
</xsd:element>
</xsd:sequence>
</xsd:complexType>
</xsd:schema>
Hi
1)Right click on Data types and click on new
2)Give a name and say create
3)click on INsert element and give your root or parent node.
4)create your child nodes at another sublevel.
By default the nodes do not contain anything unless mapped.
Thanks
Saiyog
update thread if any doubts
Edited by: Saiyog Gonsalves on Jul 31, 2008 5:40 PM
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
90 | |
10 | |
10 | |
10 | |
7 | |
7 | |
6 | |
5 | |
4 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.