-
Parent Child
I Have XML that looks like this
<Case>
<CaseID>1</CaseID>
<CaseDate>6/13/2005</CaseDate>
</Case>
<CasePatient>
<CaseID>1</CaseID>
<CasePatientID>2</CasePatient>
<PatientAddress>123 Main Street</PatientAddress>
</CasePatient>
<CasePatient>
<CaseID>1</CaseID>
<CasePatientID>3</CasePatient>
<PatientAddress>123 Main Street</PatientAddress>
</CasePatient>
<PatientNotes>
<CasePatientID>2</CasePatientID>
<NoteDate>6/13/2005 12:00:00</NoteDate>
<Note>This is Note 1</Note>
</PatientNotes>
<PatientNotes>
<CasePatientID>2</CasePatientID>
<NoteDate>6/13/2005 1:00:00</NoteDate>
<Note>This is Note 2</Note>
</PatientNotes>
<PatientNotes>
<CasePatientID>3</CasePatientID>
<NoteDate>6/13/2005 12:00:00</NoteDate>
<Note>This is Note 1</Note>
</PatientNotes>
<PatientNotes>
<CasePatientID>3</CasePatientID>
<NoteDate>6/13/2005 1:00:00</NoteDate>
<Note>This is Note 2</Note>
</PatientNotes>
There is going to be many cases and with that many patients and patient notes along with other data in similar situations. MY question is I need to format this to CSV. How do I get the Patient Information for each case and then the Notes for each patient
Works out to be Parent --Child -- Child
-
Do you have a DTD or Schema for your definition of this xml file? Posting that would be very helpful. Often, if you have one then it is very easy to extract an xsl transformation file from it.