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



Paul,

I just finished an XML project, with similar paramaters to yours, (customer
running less that V5R4, so the fancy XML routine are not available).

I wound up with the following:

fill XMLWork with the inbound XML data

c eval XMLWork=InputBuf



fill XMLField with the XML tag you are processing, and call GetXML

c eval XMLField='<HostMessage>'
c exsr GetXML
c movel XMLResult HostMessage


XMLResult has the inbound value.



Here is the GetXML subroutine:
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
* This extracts XML data from an input field
*+++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

C GetXML BEGSR


c move *blanks XMLResult

c '>':1 scan xmlfield fl
c* add 1 fl
c xmlfield:fl scan xmlwork xmlpos 5 0 8180

c move XMLField XMLField2
c movel '/' XMLField2
c xmlfield2:fl scan xmlwork xmlpos2 5 0 9190

c xmlpos add fl xmlpos
c xmlpos2 sub 1 xmlpos2
c xmlpos2 sub xmlpos diff

c *in80 ifeq *on
c diff subst xmlwork:xmlposxmlresult
c endif

c *in81 ifeq *on
c movel 'error' xmlresult
c endif

c move XMLWork XMLWork 4096
c move XMLResult XMLResult 25
c move XMLField XMLField 25
c move XMLField2 XMLField2 25
c z-add diff diff 5 0
c z-add fl fl 5 0

C ENDSR


HTH

Armand


"Paul Nelson" <nelsonp@xxxxxxxxxxxxx> wrote in message
news:mailman.6959.1236082074.26163.midrange-l@xxxxxxxxxxxxxxx
1. Can it be done?
2. Does it require an extra LPP?
3. Anybody got any code samples they are willing to post?

Thanks

Paul Nelson
Office 512-392-2577
Cell 708-670-6978
nelsonp@xxxxxxxxxxxxx






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.