Jump to content
xisto Community
Sign in to follow this  
arunkumarhg

XML Database XML Database

Recommended Posts

Hi all,

Am in need of XML Database. The requirments are as follows,

<xml>
      <fname>SomeName</fname>

      <lname>OtherName</lname>

</xml>


What i need is , i wanna XML database with JAVA API Support to access the Perticular Element of the Perticular Node,
Example SUppose i wanna get "fname" then all i need to do is just send the query to the XML DB saying "getfname"

Any idea, any resources, or even any links are welcome.

Plz am in need.

Regards
Arunkumar.H.G

Notice from moonwitch:
I have removed the reference to swear words as this is a forum for the general audience, please refrain from using such "cloaked" language. Thank you

Edited by moonwitch (see edit history)

Share this post


Link to post
Share on other sites

XML APIs for databases
Blend the power of XML and databases using custom SAX and DOM APIs
Summary
Most Web applications require the presentation of database-generated information. XML, because of its ability to separate content from presentation, is fast becoming an industry standard for data exchange. Most XML tools work with either the SAX or DOM API. This article presents a way to blend the power of a database with the features of XML. It also provides a simple, pure Java implementation of XML APIs for databases that works with any JDBC data source. With this approach, XML tools can treat a database as a virtual XML document.

====
For processing XML documents, most XML tools work with the SAX or DOM API. In this article, we'll look at a way to implement the same APIs directly over a database, enabling XML tools to treat databases as if they were XML documents. That way, we can obviate the need of converting a database.
====

XML APIs for databases: The basics
Because of a database's highly regular data-storage structure, we can map it into data-centric XML documents. For example, we can transform a database table into an XML document with a DTD of the following form:


<!ELEMENT table rows*>
<!ELEMENT rows (column1, column2, ...)>
<!ELEMENT column1 #PCDATA>
<!ELEMENT column2 #PCDATA>

=====

Implementing the SAX API for Databases
To implement the SAX API for Databases, we need to implement a parser that operates on a JDBC data source, iterates over each row and column, and generates appropriate SAX events while iterating. The SAX specification provides the org.xml.sax.InputSource class that models a data source representing a URL or a byte stream. To represent a database, we need a specialized form of it that can represent a table in a database. We therefore implement JDBCInputSource, which extends the org.xml.sax.InputSource class.



and so on and so on.

for further detail u can read it here
Java World

Danke

Oncom Beureum
The Best Place in the City

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×
×
  • Create New...

Important Information

Terms of Use | Privacy Policy | Guidelines | We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.