|
I have an xml document loaded into a user space and I want to find a specific
tag. I can use the %Scan BIF but I'm looking for something that will search
the entire user space at one time without having to loop and check 64k at a
time.
Currently I'm trying to use the C strstr function but it keeps giving me a
pointer value when the search string doesn't exist in the user space. I have
listed the associated code below.
If anyone sees a problem with my code or has a better way I'm all ears (or eyes
in this case).
// Search for substring
d SchStr pr * ExtProc('strstr')
Error number
d * Const Options(*String)
String to search
d * Const Options(*String)
String to find
// XML string being worked on
d XMLString@ s *
d XMLString s 64000 Based(XMLString@)
d TmpPtr s *
// Search constants
d b_PDF s 5 Inz('<pdf ')
TmpPtr = SchStr(%TrimR(XMLString) :b_PDF);
Rick
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2025 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.