This week's giveaway is in the Android forum.
We're giving away four copies of Android Security Essentials Live Lessons and have Godfrey Nolan on-line!
See this thread for details.
The moose likes XML and Related Technologies and the fly likes XML & Databases Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML & Databases" Watch "XML & Databases" New topic
Author

XML & Databases

Nirmala Devi
Greenhorn

Joined: Jul 31, 2001
Posts: 3

I have a question related to displaying the Database records using XML. I had gone through the eleven rules for moving a relational database to XML by Kevin Williams. All the rules are clear. But when I try to create an XML to do this, I am confused.
Details�.
After explaining all the eleven rules, the author creates the following DTD.
<!ELEMENT SalesData (Invoice*, Customer*, Part*, MonthlyTotal*)>
<!ATTLIST SalesData
Status (NewVersion | UpdateVersion | CourtesyCopy) #REQUIRED>
<ELEMENT Invoice (LineItem*)>
<ATTLIST Invoice
InvoiceNumber CDATA #REQUIRED
TrackingNumber CDATA #REQUIRED
OrderDate CDATA #REQUIRED
ShipDate CDATA #REQUIRED
ShipMethod (USPS | FedEx | UPS) #REQUIRED
��
(For the sake of discussion, I included only Invoice table here)
How do I create an XML for the above DTD, which displays all the records (say 10 records) from the Invoice database.???
I couldn't understand the XML, which is given by Kevin. How the values are coming from invoice table into this XML??
Any explanation is appreciated.
Regards
Devi
Ajith Kallambella
Sheriff

Joined: Mar 17, 2000
Posts: 5782
I haven't read the book myself, but I'm guessing there is a little class that translates the DB Result set into an XML string. Apparently this approach happens to be a popular one for generating XML-ized resultsets for databases that are not XML enabled.


Open Group Certified Distinguished IT Architect. Open Group Certified Master IT Architect. Sun Certified Architect (SCEA).
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML & Databases
 
Similar Threads
XML and XSL
Whether It need to be validated
passing Invalid characters within XML tags
Urgent help !!!!!!
ID and IDREF attributes in XML