XMLParser or string-manipulatation
Author: thomas.young@young-consulting.de (Thomas.Young)
Hi together,
beside the WM we have to develope some new interfaces for our application.
The new interface based on smal xml-stream (5 to 10 elements) with many attributes instead of tags.
So the question is, especially in view of maintenance and performance, should we use string manipulation (e.g. like Uli describe in his article) or should we use Uniface XML-Parser (Reader and Writer).
Has some one performance experiences with the parser?
Best regards
Thomas
3 Comments
Local Administrator
... the implemented SAXPARSER did pretty fine by now. With the triggers it should be easy to parse your tiny xml stuff.
Author: -GHAN- (hansen@ahp-gmbh.de)
Local Administrator
Hi Thomas,
this time, the article was not from me;
but if you have these simple xml structures string manipulation will do the job (and don't need callbacks).
Best way for xml-strings you want to process sequentially:
put all this in an entity or Uniface Service (where you can change the implemenation in a single place).
implement methods like:
LOAD
GET_NEXT_RECORD
CLEANUP
and use these in your application.
Sucecss, Uli
Author: ulrich-merkel (ulrichmerkel@web.de)
Local Administrator
Hi Thomas,
parser or $replace depends if you want :
- the parser control the flow of events via CALLBACK
- your application to order "next record"
The later on is more convenient and perhaps more flexible (USEQREAD, PUSH-parser etc.).
Success, Uli (2 more weeks to go)
Author: ulrich-merkel (ulrichmerkel@web.de)