Schema to XML document by JDeveloper
This tutorial explain creating xml schema from scratch and creating xml document from it as well. Jdeveloper 10g has a very easy visual editor for creating xml schema as well as xml document. It is considered that you have basic knowledge of schema. Here are step by step approach
1.Create new project and them create new XML schema
2.By default, a simple schema header tag and an example element
3. Here we are going to construct schema for an Order xml document like Order>>Item_list>>Item . A order will have id,description,shipTo address and list of items. To construct such structure we will have three complex type order_type, item_type and order_list_type. So create order_type complex type by drag and drop Complex Type component and edit properties
4. Now drag and drop sequence component to complex component
5. now drag and drop element components one by one and edit the properties
6. There will multiple items under an order so we will set “maxoccurrence” property to “unbounded”
7.After creating all required complex type, its time to create root node.
8.Here is complete order xml schema
9. Its time to create xml document out of this schema, select new XMl from xml schema option
10. select root name and dept.
11 . Here is default xml document
12 Xml with data
Comments
Post a Comment