Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] xml?

From: gchiu:compkarori at: 14-Nov-2000 22:56

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