XML:
<? XML version =”1.0”?> <Employees> <Employee> <name>saiteja</name> <Id>2434</Id> </Employee> </Employees>
Note1:
Id not there then instead of <Id>2430</Id> write <Id/>
Note2:
- XML pay load
- XML data
- XML document
Note 3:
When write the XML document follow the below instructions
- Instead of
- < - <
- > - >
- & - &(ampersand)
- “ - "(double quote)
- ‘ - &apos(Single quote)
10,20 numbers:
<? XML version =”1.0”?> <Numbers > <Number > <Num1 >10</Num1 > <Num2>20</Num2> </Number > </Numbers >
Inclined to build a profession as Oracle SOA Admin?
Then here is the blog post on, explore Oracle SOA Admin Training
XSD:
<? XML version = “1.0”?> <Schema> <element name=”employees”> <Complex type> <Sequence> <element name= “employee”> <complex Type> <sequence> <Element name =”Name” type =”string”/> <Element name =”Id” type =”int”/> <Element name =”location” type =”string”/> </sequence> </complex Type> </element> </sequence> </complex Type> </elements> </Schema>
XSD: It is used to define the data types of respective XML
Validation/ Enumerations/ restrictions in XSD:
<simple type name = “Name type”> <restriction type/ base= “string”> <enumeration value =”sai”/> <enumeration value =”Teja”/> <enumeration value =”XYZ” /> </restriction> </simple type>.
- customer, employee having/wants same data then we are write like this
<? XML version = “1.0”?> <target Name space =”http://TCS.com/add2 numbers”> <Schema> <element name=”employees” Type = “employee Type”/> <element name=”customer” Type = “employee Type”/> <complex Type name=”employee Type/”> <Sequence> <element name=”Name” Type = “string”/> <element name=”Eid” Type = “int”/> </Sequence> </complex Type> </element> </schema>
Definitions:
- Name space: To avoid the collision (conflict) we will use the “name space” with identifies
- Target name space: It is address of XML,XSD
(or) It is address of any of artefacts -> XML, XSD, XSLT, XQuery, WSDL
- Import: It is importing other XSD’s which are having “different T.N.S”.
- Include: It is importing other XSD’s which are having “same T.N.S”.
- XSD:
<? XML version = “1.0”?> <target Name space =”http://TCS.com/item”> <Schema> <element name=”Item” Type = “Item Type”/> <complex Type name=”Item Type/”> <Sequence> <element name=”item id” Type = “int”/> <element name=”price” Type = “int”/> </Sequence> </complex Type> </element> </schema>
Oracle SOA Interview Questions
Import above XSD into My XSD:
<? XML version = “1.0”?> <target Name space =http://oracle.com/customer> XMlns : item =” http://Tcs.com/item” - <types> <import name space =”http://TCS.com/item”> schema location =”tem.XSD” </types>
Include above XSD(item.XSD) into my XSD:
<? XML version = “1.0”?> <target Name space =http://TCS.com/customer> XMlns : item =” http://Tcs.com/item” - <types> <nclude schema location = “item .XSD”> </types>
X –path language:
<? XML version = “1.0”?> <Customers> <Customer> <name> Ramesh </name> <id> 12345</id> <loc> hyd</loc> </Customer> <Customer> <name> Ramesh1 </name> <id> 121121</id> <loc> bngl</loc> </Customer> </Customers>
- //* -> Entre XML document/pay load
- /customers/customer[2] -> 2nd record from XML document
- / customer/customer[2]/loc -> <loc>Ind </loc>
- / customer/customer[2]/loc /text() -> Ind
- / customer/customer[d>450]/Name/text() -> ABC
- / customer/customer[position()<= lost()-1]/id/test -> 49,50
49=50-1 Note: Total records 50
XSD: It is used to define the data types of respective XML.
For in-depth knowledge on Oracle SOA click on:
- Oracle service bus in SOA
- Oracle SOA Business rule engine
- Java messaging service in Oracle SOA 11g
- Oracle 11g installation step by step process
- How to work with FTP(File transfer protocol) in Oracle SOA