Click here to Skip to main content
15,886,026 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
I know it's like asking where the Coke machine is at the Pepsi factory but is there any way to read MS ADO XML using Java?

I've been stuck with Visual Studio 6 since 1998 because my company refused to upgrade to .NET and more recently decided they're never going to and we became a Java shop. I have a set of transmission files that I'm writing in XML format

VB
Dim rstCycle As New ADODB.Recordset
rstCycle.CursorLocation = adUseClient
rstCycle.CursorType = adOpenStatic
rstCycle.LockType = adLockOptimistic
rstCycle.Open strSql, cnnSql

If rstCycle.RecordCount > 0 Then
   rstCycle.Save strOutFile, adPersistXML
End If


and reading at the server using ADO.

Now, I have to update this functionality and the only development environment I have is Java. Is there any way to read that data or do I need to redesign the transmission files?

Thanks for any help.

P.S. Java newbie.
Posted
Comments
George Jonsson 13-Oct-15 22:22pm    
What does the format, the schema, of your XML file look like?
And how do you get your input data?
If I understand you correctly, your task is to write data to an XML file and that is possible in Java or basically any language.
keithd1965 14-Oct-15 9:27am    
The write to is handled through Microsoft tools to nonstandard XML formatting. The read from is the problem.

1 solution

 
Share this answer
 
Comments
keithd1965 14-Oct-15 9:28am    
Thank you but this is not standard XML but Microsoft going their own way.
Richard MacCutchan 14-Oct-15 11:00am    
Well then I suspect you will need to consult the Microsoft documentation to establish how you can read it. If Java does not have a built in class to handle it you will need to write your own, or use a C/C++ library linked via JNI.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900