File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes XML and Related Technologies and the fly likes XML record count Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of EJB 3 in Action this week in the EJB and other Java EE Technologies forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "XML record count" Watch "XML record count" New topic
Author

XML record count

Chuck Lowry
Greenhorn

Joined: May 29, 2002
Posts: 13
I am using OracleXMLQuery to retrieve XML from our database and need to retrieve the total number of records in the XML. I am currently using the XPath count() function, but it takes too long for large queries. Is there a faster way to get the record count from the XML? Thanks.
Chuck Lowry
Greenhorn

Joined: May 29, 2002
Posts: 13
In case anyone else ever has this question...
If you are using OracleXMLQuery you can run the method getNumRowsProcessed() against your query object and return the number of rows. I'm still not sure of a better way to do it from the XML document, but if anyone has any ideas, please email me.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: XML record count
 
Similar Threads
locking and unlocking mechanism
getting recordCount from ResultSet object ?
Hibernate should hit db every single time
Formatting xml using java
jdbc and servlets