Feeds

Build business-ready XML Schema with JDeveloper

Communicate clearly

  • alert
  • submit to reddit

Combat fraud and increase customer satisfaction

ComplexType articleType also has an attribute section. Add an attribute to articleType from the Component Palette. Set attribute name to section and type to xsd:string. Select File>Save to save the XML schema.

Adding a sequence to journalType

Registering a Schema

Registration means that you may create an instance of an XML document that conforms to the schema you've just created. To register a schema in JDeveloper 10.1.3, select Tools>Preferences in the main menu. In the Preferences window select the XML Schemas node. In the XML Schemas window, click on the Add button to register a schema. In Add Schema, click on Browse to select a schema then Select catalog.xsd. Extension .xml specifies the extension of file type for which a registered schema may be used to create an XML document instance.

Creating an XML Document from Schema

Now it's time to create an XML document instance, catalog.xml, from the registered schema, catalog.xsd. While we're using a registered schema, a registered schema is not essential as its also possible to create an XML document instance using an XML Schema in the file system.

Using a registered XML Schema, though, does have the advantage that you may associate it with a specific file extension. For example, to register an XML Schema for generating only .xslt files you would associate the .xslt extension with the XML Schema.

Select project node XMLSchema in Applications-Navigator, and select File>New in the main menu. In the New Gallery window select the General>XML node. Select XML Document from XML Schema in Items listed. The Create XML Document from XML Schema wizard will now get started.

Click Next, In File Location specify XML file name and then. select Use Registered Schemas and then click on Next. In Options, select the target namespace for the XML Schema. Select root Element as catalog, and click on Next.

To create an XML document from an XML Schema fragment select another global element as the root element. The other options that may be specified are depth of the XML document to be generated in terms of element levels, encoding, and the option to generate only the required elements.

In the Finish window, click on Finish and an XML document instance will be added. The XML document will have all the elements defined in the XML Schema needed to instantiate the XML document.

Finally, we add element and attributes to the XML document to construct XML document catalog.xml. Select the journal node in Structure Panel. In the Property Inspector specify values for the attributes title, publisher, and edition. Select article element node in the Structure Panel and specify a value for section attribute, and title and author elements.

To add another journal element, position the cursor inside the closing tag of catalog element, and select journal in component palette. A <journal/> node will be added to catalog element. Select journal node in Structure Panel and add values to title, publisher, and edition attributes in Property Inspector.

Next, add an article element node to journal element. Position your cursor inside the closing tag of the journal element and select article from the component palette. In the Insert Article window specify the values for author and title elements. Click on Advanced Properties,specify a value for section attribute and then click on OK for the Catalog.xml to be created.

Constructing an XML Document

Conclusion

You're new armed with the practical knowledge needed on to create a recognizable and commonly understandable XML document using an XML Schema you've created using Oracle's JDeveloper IDE.

Combat fraud and increase customer satisfaction

More from The Register

next story
OpenBSD founder wants to bin buggy OpenSSL library, launches fork
One Heartbleed vuln was too many for Theo de Raadt
Got Windows 8.1 Update yet? Get ready for YET ANOTHER ONE – rumor
Leaker claims big release due this fall as Microsoft herds us into the CLOUD
This time it's 'Personal': new Office 365 sub covers just two devices
Redmond also brings Office into Google's back yard
Ubuntu 14.04 LTS: Great changes, but sssh don't mention the...
Why HELLO Amazon! You weren't here last time
Patch iOS, OS X now: PDFs, JPEGs, URLs, web pages can pwn your kit
Plus: iThings and desktops at risk of NEW SSL attack flaw
Next Windows obsolescence panic is 450 days from … NOW!
The clock is ticking louder for Windows Server 2003 R2 users
Batten down the hatches, Ubuntu 14.04 LTS due in TWO DAYS
Admins dab straining server brows in advance of Trusty Tahr's long-term support landing
Red Hat to ship RHEL 7 release candidate with a taste of container tech
Grab 'near-final' version of next Enterprise Linux next week
Apple inaugurates free OS X beta program for world+dog
Prerelease software now open to anyone, not just developers – as long as you keep quiet
prev story

Whitepapers

Mobile application security study
Download this report to see the alarming realities regarding the sheer number of applications vulnerable to attack, as well as the most common and easily addressable vulnerability errors.
3 Big data security analytics techniques
Applying these Big Data security analytics techniques can help you make your business safer by detecting attacks early, before significant damage is done.
The benefits of software based PBX
Why you should break free from your proprietary PBX and how to leverage your existing server hardware.
Securing web applications made simple and scalable
In this whitepaper learn how automated security testing can provide a simple and scalable way to protect your web applications.
Combat fraud and increase customer satisfaction
Based on their experience using HP ArcSight Enterprise Security Manager for IT security operations, Finansbank moved to HP ArcSight ESM for fraud management.