× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Just my personal preference, but I use jDOM (jdom.org) for my XML parsing in
java.  If you are just outputting XML you wouldn't really need an XML parser
unless you want to validate against a schema/DTD.  For instance you could
just do something like this.
ResultSet rs = ...
String xml = "<xml><order id='" + rs.getString("ORDNUM") + "'></xml>");

System.out.println(xml); // put your writes to the new xml file here.

Does this program need to receive in a request to know what data to get from
the 400? and if so is that request going to be in XML?  For instance an XML
request might look like this, and you would process it with a Servlet over
HTTP possibly.

<xml>
<Request type='getOrder'>
<Parm id='OrderNumber'>123456</Parm>
</Request>
</xml>

Based on the request type and the parm id you would know to go to your order
files and pull the specific order that was passed in.

Hope that helps,
Aaron Bartell 

-----Original Message-----
From: Amit Shukla [mailto:AShukla@xxxxxxxxxxxxxxxxxxx]
Sent: Friday, April 18, 2003 9:27 AM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: Using XML to access data from AS400


Hi Aaron,

I am using Java(JT400.jar/JDBC-ODBC) to extract the info from DB2 database,
once the databse info is available in the ResultSet it should be able to
write an in-memory DOM document Object then this information should be
written to an XML file. So thats the idea.

Any suggestions/questions??

Amit.

-----Original Message-----
From: Bartell, Aaron L. (TC) [mailto:ALBartell@xxxxxxxxxxxxxx]
Sent: Thursday, April 17, 2003 2:54 PM
To: 'Java Programming on and around the iSeries / AS400'
Subject: RE: Using XML to access data from AS400


What languages are you familiar with?  Or rather, what language do you want
it in?

How do you want to make the XML available? Put it into the IFS, via CGI over
HTTP, or something else?

There are many ways to skin this cat.  Maybe if you could give us some more
information as to what you are trying to accomplish. . .


Aaron Bartell

-----Original Message-----
From: Amit Shukla [mailto:AShukla@xxxxxxxxxxxxxxxxxxx]
Sent: Thursday, April 17, 2003 10:55 AM
To: 'JAVA400-L@xxxxxxxxxxxx'
Subject: Using XML to access data from AS400


Hi All,

I need help with accessing data from AS400 database DB2. We have some
database files in AS400 (DB2) which has to be retrieved/accessed and that
data should be available in an XML file. Please send me some sample code of
XML to do this, if available.

Thanks a lot for your help,

Amit. 
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.
_______________________________________________
This is the Java Programming on and around the iSeries / AS400 (JAVA400-L)
mailing list
To post a message email: JAVA400-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo.cgi/java400-l
or email: JAVA400-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/java400-l.

As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.