• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other all forums
this forum made possible by our volunteer staff, including ...
  • Campbell Ritchie
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Devaka Cooray
  • Paul Clapham
  • Tim Cooke
  • Knute Snortum
  • Bear Bibeault
Saloon Keepers:
  • Ron McLeod
  • Tim Moores
  • Stephan van Hulst
  • Piet Souris
  • Ganesh Patekar
  • Frits Walraven
  • Carey Brown
  • Tim Holloway

XML & Databases

Posts: 3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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.
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
TrackingNumber 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.
Posts: 5782
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Consider Paul's rocket mass heater.
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!