× 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.



Here is an example that may help you get started. Refer to the last post
I made on this subject to get more information on building prototypes
for Java calls. This snippet shows how to build a simple XML document
using JDom:

      ********************************
      * General Purpose Java Objects *
      ********************************
     DnewString        PR              O   extproc(
     D                                       *JAVA:
     D                                       'java.lang.String':
     D                                       *CONSTRUCTOR)
     D byteArray                  32767A   CONST VARYING
     DnewFileWriter    PR              O   EXTPROC(
     D                                       *JAVA:
     D                                       'java.io.FileWriter':
     D                                       *CONSTRUCTOR)
     D                                     CLASS(
     D                                       *JAVA:
     D                                       'java.io.FileWriter')
     D String                              LIKE(newString)
     D                                     CONST

      *************************************
      * JDom XML Parsing API Java Objects *
      *************************************

      ****************
      * Java Objects *
      ****************
     DnewElement       PR              O   EXTPROC(
     D                                       *JAVA:
     D                                       'org.jdom.Element':
     D                                       *CONSTRUCTOR)
     D
CLASS(*JAVA:'org.jdom.Element')
     D Element                             LIKE(newString)
     D                                     CONST
     DnewAttribute     PR              O   EXTPROC(
     D                                       *JAVA:
     D                                       'org.jdom.Attribute':
     D                                       *CONSTRUCTOR)
     D
CLASS(*JAVA:'org.jdom.Attribute')
     D Attribute                           LIKE(newString)
     D                                     CONST
     D Value                               LIKE(newString)
     D                                     CONST
     DaddContent       PR                  EXTPROC(
     D                                       *JAVA:
     D                                       'org.jdom.Element':
     D                                       'addContent')
     D Element                             LIKE(newElement)
     DsetAttribute     PR              O   EXTPROC(
     D                                       *JAVA:
     D                                       'org.jdom.Element':
     D                                       'setAttribute')
     D
CLASS(*JAVA:'org.jdom.Element')
     D Attribute                           LIKE(newString)
     D                                     CONST
     D Value                               LIKE(newString)
     D                                     CONST
     DnewDocument      PR              O   EXTPROC(
     D                                       *JAVA:
     D                                       'org.jdom.Document':
     D                                       *CONSTRUCTOR)
     D
CLASS(*JAVA:'org.jdom.Document')
     D Element                             LIKE(newElement)
     DXMLOutputter$output...
     D                 PR                  EXTPROC(
     D                                       *JAVA:
     D
'org.jdom.output.XMLOutputter':
     D                                       'output')
     D Document                            LIKE(newDocument)
     D Writer                          O   CLASS(*JAVA:'java.io.Writer')
     DnewXMLOutputter  PR              O   EXTPROC(
     D                                       *JAVA:
     D
'org.jdom.output.XMLOutputter':
     D                                       *CONSTRUCTOR)
     D                                     CLASS(
     D                                       *JAVA:
     D
'org.jdom.output.XMLOutputter')
     DXMLOutputter$outputString...
     D                 PR              O   EXTPROC(
     D                                       *JAVA:
     D
'org.jdom.output.XMLOutputter':
     D                                       'outputString')
     D                                     CLASS(
     D                                       *JAVA:
     D                                       'java.lang.String')
     D Document                            LIKE(newDocument)
...
      /free
          wrkString = newString('invoice');
          invElement = newElement(wrkString);
          invDocument = newDocument(invElement);
          wrkString = newString('/home/dmorris/simpleinvoice.xml');
          invFileWriter = newFileWriter(wrkString);
          XMLOutputter$output(invXMLOutputter: invDocument:
invFileWriter);
      /end-free


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.