Maybe one day I'll get my data as XML rather than HL7, and
in preparation I've been wondering how I would go about
extracting data.

Eg.

tagblock: [ "HB" "WBC" "PLATELETS" "ESR" ]

FBC: make object! [
  HB: none
  WBC: none
  PLATELETS: none
  ESR: none
]

; dataline: "<HB>105</HB><WBC>7.1</WBC><PLATELETS>400</PLATELETs><ESR>100</ESR>"

grabtags: func [ dataline [string!] 
        /local headtag tailtag results result ] [
        results: make block! 4
        foreach element tagblock [
                headtag: rejoin [ "<" element ">" ]
                tailtag: rejoin [ "</" element ">" ]
        
        parse dataline [ thru headtag copy result to tailtag ]
                ( { how does one set the appropriate instance variable
eg. FBC/ESR gets set to 100} )
        ]
]

So, looking for an elegant solution to setting the instance
variables ...

--
Graham Chiu
-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to