[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

xml-sax issue



I am attempting to parse out the data I'm getting from a web service and
I'm having a little trouble.

I'm using the following as my to the handler:

   xml = %trim(%subSt(GetResponse:3:5000));
   xml-sax %handler(xmlHandler: ignoreMe)
      %XML(xml: 'doc=string');

GetResponse has the full xml string I'm expecting.

my xmlhandler is defined as follows:

P xmlHandler      b
D                 pi            10i 0
D ignore                         1a
D event                         10i 0 value
D   string                        *   value
D   stringLen                   20i 0 value
D   exceptionId                 10i 0 value

I then have the following code in the procedure:

OutputXML.name = XML_Event_Name(event);
OutputXML.data = *blanks;

select;
when string=*null or stringlen<1;
   // no string given...
when stringlen>%size(value);
   OutputXML.data = '** string length invalid';
other;
   OutputXML.data = %subst(value:1:stringlen);
endsl;

// Change Current XML group if applicable
Select;
   When OutputXML.name = 'XML_START_ELEMENT';




The problem is outputXML.data never has a value that I can see.  Am I
doing something wrong or am I missing a step?









-----------------------------------------------------------------------
This is the FTPAPI mailing list.  To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------