aspose file tools*
The moose likes XML and Related Technologies and the fly likes Help: Where can find Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Spring in Action this week in the Spring forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Help: Where can find "JDBCSAXUtil"" Watch "Help: Where can find "JDBCSAXUtil"" New topic
Author

Help: Where can find "JDBCSAXUtil"

Lucida Lee
Greenhorn

Joined: Nov 18, 2003
Posts: 4
as I want to build XML Document From Database using SAX,
I know to get it by :
try {
InputSource dbis
= JDBCSAXUtil.setupSourceFromProperties(dbPropFile);
transform(_xslProcessor,
Driver.fileInputSource(new File(xslFile)), dbis);
}
My Problen is where to get the class "JDBCSAXUtil"
thanks
Lucida Lee


thanks<br /> Lucida Lee
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I assume you've seen some example code using this "JDBCSAXUtil" class, right?
It's not part of any standard library, and I have a gut feeling that it might not be part of any popular open source project either. Typically, people write these utility classes themselves and this might very well be one of those cases.
Could you give any details about the context in which you encountered this JDBCSAXUtil class?


Author of Test Driven (2007) and Effective Unit Testing (2013) [Blog] [HowToAskQuestionsOnJavaRanch]
Lucida Lee
Greenhorn

Joined: Nov 18, 2003
Posts: 4
you are very right, this is the book <<Instant XML/XSL/Java>>,
and I download the code in this website
website
http://www.bhp.com.cn/download/3572.zip
Lucida Lee
Greenhorn

Joined: Nov 18, 2003
Posts: 4
I found the sample is very hard to work ,
can u give me some Completed Samples that
using XML/XSL/JAVA/JDBC to form a report from the database, or simply
query some table and translate the result into html/xhtml,
thank you very !!
Lasse Koskela
author
Sheriff

Joined: Jan 23, 2002
Posts: 11962
    
    5
I'm not aware of a complete example of what you're describing. However, I'd like to remind you that "Divide and Conquer" does work and you might want to split the task into:
1) Read data from database using JDBC into a ResultSet
2) Convert the ResultSet into XML
3) Write an XSL stylesheet for transforming the XML to HTML
4) Write the Java code to do 1-3 in a row
For 2), you might want to do a search on this forum with keywords like "XML" and "ResultSet".
Lucida Lee
Greenhorn

Joined: Nov 18, 2003
Posts: 4
thanks, I'll try
 
It is sorta covered in the JavaRanch Style Guide.
 
subject: Help: Where can find "JDBCSAXUtil"