[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
HTTPAPI/eXPat Style/Model
I currently have production programs using HTTPAPI and EXPAT where I
split the function into two pieces. One program uses HTTPAPI and
issues the post call like this:
rc = http_url_post_raw(
'[1]https://www.someplace.com'
: %Addr(Data)
: %Len(%TrimR(Data))
: 1
: %Paddr('INCOMING'));
Where incoming is a routine that writes the returned XML to a file.
I have another program that uses eXpat and registers handlers like
this:
p = XML_ParserCreate(*NULL);
...
XML_SetStartElementHandler(p: %paddr(strElement));
XML_SetEndElementHandler(p: %paddr(endElement));
XML_SetCharacterDataHandler(p: %paddr(prcElement));
I basically set condition flags in the strElement routine (and process
attributes), turn off condition flags in the endElement routine, and
does work in the prcElement routine, calling other routines based on
the condition flags.
Should I combine this processing into one program? I currently have
HTTPAPI 1.20 on my system, and think I should move to 1.23 to take
advantage of the http_XmlReturnPtr function.
Comments? Thanks!
References
1. https://www.someplace.com/
-----------------------------------------------------------------------
This is the FTPAPI mailing list. To unsubscribe, please go to:
http://www.scottklement.com/mailman/listinfo/ftpapi
-----------------------------------------------------------------------