Google Answers Logo
View Question
 
Q: Need Delphi 5 component to parse and validate and create XML using XSD. ( No Answer,   0 Comments )
Question  
Subject: Need Delphi 5 component to parse and validate and create XML using XSD.
Category: Computers > Programming
Asked by: danfigp-ga
List Price: $75.00
Posted: 10 Jan 2005 07:32 PST
Expires: 09 Feb 2005 07:32 PST
Question ID: 454986
Looking for a Delphi 5 component / code (with full source code) that
will enable me to:
a) Parse XML (standard and non-standard ? see XML below for exact requirement)
b) Validate XML against XSD with useful error messages (document level
and record level and field level)
c) Create XML

It would be also useful for the component to be able to create the XSD
if possible (like in .NET) ? however not sure how that would work as I
have one XML file and 4 Access tables (The Access table has slightly
different field names then the XML fields)

Programming details:
I need to take the one XML file and parse it and validate it with
useful error messages and to parse as much of the XML file despite
errors.  The good data goes into 4 MS Access tables and the errors
into an error log table.

Then after my processing the data will be exported from the same 4 MS
Access tables into the same structured but different XML file.

XML details (if needed):
 -The XML file has 2 types of records, the SitePatientVisit and the
SitePatientVisitDrug.
 -This example has two records of SitePatientVisit and sometimes a
SitePatientVisit will have a SitePatientVisitDrug record.
 -The XML file take the SitePatientVisitDrug info and that goes into
one MS Access table, and the other data is spit into 3 MS Access
tables.
XML file is below.
---------------------------------------

<?xml version="1.0" encoding="utf-8" ?> 
- <SitePatientVisit_Records version="2004_11_08">
- <SitePatientVisit Site_cod="01" Patient_cod="010101" Visit_cod="20050121">
  <sel_VisitType value="FamilyMDVisit" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_BirthDate value="1936-11-21" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_Gender value="Female" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_Surname value="Smith" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_GivenNames value="John" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_StreetAddress value="123 Main Street" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <txt_City value="Ottawa" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_Prov value="ON" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_PostalCode value="K1A 1A1" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_Telephone value="613-123-4567" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <txt_Telephone2 value="613-987-6543" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <txt_Fax value="613-135-2468" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <txt_EmailAddress value="smith@patientco.ca" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_MI value="true" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_MI_first value="1998-6-15" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_MI_last value="2001-6-15" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <b_ACS value="false" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_ACS_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_ACS_last value="2002-8-15" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <b_Angina value="false" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_Angina_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Revascularization value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_Revascularization_first value="1998-6-15"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <dat_Revascularization_last value="2001-6-15"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <b_Stroke value="true" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_Stroke_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_Stroke_last value="2003-9-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_PVD value="false" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_PVD_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Diabetes value="false" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_Diabetes_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Hypertension value="false" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_Hypertension_first value="1998-6-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Hypercholesterolemia value="false" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_Hypercholesterolemia_first value="1998-6-15"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <int_SmokingAverage_CigsPerDay value="20" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_SmokingAverage value="2005-01-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_SmokingCumulative_PackYears value="12" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_SmokingCeased value="2002-06-15" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_ExerciseAverage_MinutesPerWeek value="60"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <int_BaselineDiet_score value="7" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_FruitsAndVegetablesAverage_ServingsPerDay value="3"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <int_BaselinePsych_score value="10" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_Depression_category value="Low" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_Stress_category value="Moderate" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_LocusOfControl_category value="High" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_MedicationAdherence_genprob value="Minor"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <sel_MedicationAdherence_beliefs value="Minor"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <sel_MedicationAdherence_recall value="Minor"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <sel_MedicationAdherence_access value="Minor"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
- <SitePatientVisitDrug Drug_cod="AHFS_12.08.024.666.888">
  <txt_DrugName value="propranolol" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_DrugType value="BB" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_FlaggedAllergyOrIntolerance value="yes" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  </SitePatientVisitDrug>
  <int_Height_cm value="171" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_Weight_kg value="101.0" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <int_WaistCircumference_cm value="121" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_HipCircumference_cm value="91" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_SBP_mmHg value="161" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <int_DBP_mmHg value="101" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_BP value="2005-01-31" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <int_Pulse_bpm value="72" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_FootExam_Neuropathy value="absent" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_FootExam_Ischemia value="present" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_FootExam_Ulcer value="absent" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_FootExam_Infection value="absent" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_FootExam_OtherAbnormality value="absent"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <dat_FootExam value="2005-01-31" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_EyeExam_DiabeticRetinopathy value="absent"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <sel_EyeExam_HypertensiveRetinopathy value="absent"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <sel_EyeExam_OtherAbnormality value="absent" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_EyeExam value="2005-01-31" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_HbA1c value="0.11" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_HbA1c value="2005-01-11" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_Glucose_mM value="6.2" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_Glucose value="2005-01-11" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_LDL_mM value="3.4" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_LDL value="2005-01-11" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_HDL_mM value="2.1" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_HDL value="2005-01-11" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_TotalCholesterol_mM value="7.8" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_TotalCholesterol value="2005-01-11" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dbl_Triglycerides_mM value="9.5" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_Triglycerides value="2005-01-11" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dbl_UrineAlbuminCreatinineRatio_mgPermmol value="3.4"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <dat_UrineAlbuminCreatinineRatio value="2005-01-11"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <dbl_UrineAlbumin_mgPerDay value="3.4" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_UrineAlbumin value="2005-01-11" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_Diet value="true" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_Exercise value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_SmokingCessation value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_Diabetes value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_Psychosocial value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Counseled_Other value="true" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <b_Referred_FootExam value="false" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_EyeExam value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Endocrinologist value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_DiabetesEducation value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Internist value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Cardiologist value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Neurologist value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Dietician value="true" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <b_Referred_Other value="true" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
- <SitePatientVisitDrug Drug_cod="AHFS_20.04.005.555.777">
  <txt_DrugName value="enalapril" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_DrugType value="ACEI" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_IncomingStrength value="25" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_IncomingStrengthUnit value="mg" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dbl_IncomingDosage value="22" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_IncomingDosingFrequency value="BID" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_IncomingRxQty value="90" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <int_IncomingRxRepeats value="3" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dat_FirstPrescribed value="2002-03-31" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_OutgoingRxDecisionReason value="not efficacious"
signed_when="2005-01-21 13:42:52.58" signed_who="Kesh"
signed_how="EMR" />
  <dbl_OutgoingStrength value="25" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <sel_OutgoingStrengthUnit value="mg" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <dbl_OutgoingDosage value="22" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <sel_OutgoingDosingFrequency value="BID" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  <int_OutgoingRxQty value="90" signed_when="2005-01-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <int_OutgoingRxRepeats value="3" signed_when="2005-01-21
13:42:52.58" signed_who="Kesh" signed_how="EMR" />
  </SitePatientVisitDrug>
  </SitePatientVisit>
- <SitePatientVisit Site_cod="01" Patient_cod="010101" Visit_cod="20050221">
  <sel_VisitType value="LabVisit" signed_when="2005-02-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dbl_HbA1c value="0.09" signed_when="2005-02-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  <dat_HbA1c value="2005-02-11" signed_when="2005-02-21 13:42:52.58"
signed_who="Kesh" signed_how="EMR" />
  </SitePatientVisit>
  </SitePatientVisit_Records>

Clarification of Question by danfigp-ga on 12 Jan 2005 06:27 PST
Maybe I should clarify a bit.
-I am mostly interested in the a) to c) part of the question.
-I have seen a few Delphi 5 components that parse XML, but they don't
seem to return rich error messages and allow me to continue to parse
the rest of the document.
-The rest of the info are really extra details, that would be a bonus
to me and to you.

Thanks,
Answer  
There is no answer at this time.

Comments  
There are no comments at this time.

Important Disclaimer: Answers and comments provided on Google Answers are general information, and are not intended to substitute for informed professional medical, psychiatric, psychological, tax, legal, investment, accounting, or other professional advice. Google does not endorse, and expressly disclaims liability for any product, manufacturer, distributor, service or service provider mentioned or any opinion expressed in answers or comments. Please read carefully the Google Answers Terms of Service.

If you feel that you have found inappropriate content, please let us know by emailing us at answers-support@google.com with the question ID listed above. Thank you.
Search Google Answers for
Google Answers  


Google Home - Answers FAQ - Terms of Service - Privacy Policy