cancel
Showing results for 
Search instead for 
Did you mean: 

COMPLEX TYPE

Former Member
0 Kudos

Hi Friends,

Could anyone please explain me in detail about the complex type , simple type in XML. Please.

Accepted Solutions (1)

Accepted Solutions (1)

former_member184619
Active Contributor
0 Kudos

Hi murugavel,

I am not sure about these specific terms... but have a look at this blog... this might be helpful..

http://www.xaprb.com/blog/2006/03/16/simple-and-complex-types-in-xml-schema/

BTW : If you are asking about complex file type and simple xml file just check this:

/people/anish.abraham2/blog/2005/06/08/content-conversion-patternrandom-content-in-input-file

/people/venkat.donela/blog/2005/06/08/how-to-send-a-flat-file-with-various-field-lengths-and-variable-substructures-to-xi-30

Sachin

Former Member
0 Kudos

Hi,

Data type are of three types:

1) Built-In Type

Built-in data types are part of the XML schema language and have the prefix xsd. (They can also be subdivided into primitive and derived data types, but this is not important in the definition of data types). XML schema defines a value range for each built-in data type.

Example:

xsd:string

xsd:decimal

xsd:integer

2) Simple Type

Simple data types refine built-in data types, for example, by limiting the length of a string or by specifying a specific value range. Like built-in data types, they do not contain any further elements.

Example:

simpleType

name=“germanPhoneNumber“

base=“string“>

<pattern

value=“?\d?/?\d“ />

</simpleType>

3) Complex Type

Data types that can contain further elements and attributes. Elements and attributes can in turn reference built-in, simple, complex, or global data types. This enables large complex data types to be structured using smaller complex data types.

Example:

<complexType name=“person“>

<element

name=“firstname“

type=“string“ />

<element

name=“lastname“

type=“string“ />

</complexType>

Refer below link for more info:

http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/frameset.htm

Thnx

Chirag

Answers (3)

Answers (3)

Former Member
0 Kudos

Hi,

there are three typs of fileds avaialble while defineing the XML structure for Message to be transfer. Data Types and External Definitions in SAP XI follow the XSD standards.

Simple Type & Complex type & Built in Type

Simple Type :

Simple data types is built-in data types such as Character,Numeric,Date / Time, integer, float,Boolean etc and other by limiting the length of a string or by specifying a specific value range. Like built-in data types, they do not contain any further elements.

Complex Data types

Data types that contain further multiple simple elements and attributes ie.e Root-node structrue . Elements and attributes can in turn reference built-in, simple, complex, or global data types. This enables large complex data types to be structured using smaller complex data types.

Refer

https://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/25c78f79-0801-0010-1e8d-c7f911cf...

standard XML schema data types

used in the XI they are (should be) the same as in standard

http://www.w3.org/TR/xmlschema-2/#built-in-datatypes

http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/frameset.htm

Thanks

Swarup

Former Member
0 Kudos

Hello,

a simple type is exactly one value of one type (integer, string, ...).

A complex type consists of other simple types or even other complex types.

For example you have two simple types:

SIMPLE1 of type string and

SIMPLE2 of type integer

Then you can have a complex type containing the two simple types:

COMPLEX1

SIMPLE1

SIMPLE2

An instance of COMPLEX1 could look like this:

<COMPLEX1>

<SIMPLE1> Example </SIMPLE1>

<SIMPLE2> 42 </SIMPLE2>

</COMPLEX1>

Regards

Patrick

Former Member
0 Kudos

Hi

The category Complex Type means you can have as many elements as possible under the node..

Example

<Root>

</Root>

Here the parent node <Root> is complex node and , are simple nodes as they dont have any other child nodes under them

Pls see

http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/frameset.htm

Plz award points

thanq