Re: [U2] XML mapping to multiple files records
Call a subroutine that parses the data. I have done it several times. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:49 AM To: U2 Users List Subject: Re: [U2] XML mapping to multiple files records The scenario and sample I posted is theoretical. The actual data structure is much larger and has way too many nested levels. Unfortunately splitting data is a must. The two files piece is working fine it's just the multiple records in the second file that's an issue. - Josh -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Tuesday, June 23, 2009 1:42 PM To: 'U2 Users List' Subject: Re: [U2] XML mapping to multiple files records Why two files? That would be the approach with a SQL type database, but in Universe, you can make the track data multi-valued related fields in the albums file. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:38 AM To: U2 Users List Subject: [U2] XML mapping to multiple files records Hi Folks, Here's a scenario for you: Let's say there is an XML file containing album track data that we'd like to import into 2 different Universe files. A sample layout might be something like: albums album album_ID/ album_title/ album_total_runtime/ album_total_tracks/ tracks track number=1 track_ID/ track_title/ track_artist/ /track track number=2 track_ID/ track_title/ track_artist/ /track /tracks album /albums What I'm trying to do is have an ALBUMS file and a TRACKS file. I want a single record in the ALBUMS file for each album and a record in the TRACKS file for each track. Essentially every album record in the XML will product one ALBUMS record and potentially multiple TRACKS records. The trouble I'm having is getting more than one TRACKS record. I'm wondering if anyone has ever tried this before and how their experience went. I end up with just one TRACKS record with the first iteration. Is what I'm trying even possible? I've opened a case with IBM as well but figured maybe one of you has been in this situation before. - Josh ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] XML mapping to multiple files records
Thanks for the responses. I was trying to use the tools built into UniVerse rather than parse through everything which I have done on past projects. I feel the XML.TODB program or the XMLTODB function should be able to handle this no problem but seems to have an issue with multiple records. I tested this on multiple UniVerse levels including 10.3.0. I ended up writing a program that uses an XMAP file and with a combination of XMAPOPEN, XMAPREADNEXT, AND XMAPCLOSE I could get the data into Universe. Once in memory I had to do a little parsing and cleanup but eventually ended up with something acceptable. - Josh -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Kathleene M Hunter Sent: Thursday, June 25, 2009 3:57 PM To: 'U2 Users List' Subject: Re: [U2] XML mapping to multiple files records Call a subroutine that parses the data. I have done it several times. -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:49 AM To: U2 Users List Subject: Re: [U2] XML mapping to multiple files records The scenario and sample I posted is theoretical. The actual data structure is much larger and has way too many nested levels. Unfortunately splitting data is a must. The two files piece is working fine it's just the multiple records in the second file that's an issue. - Josh -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Tuesday, June 23, 2009 1:42 PM To: 'U2 Users List' Subject: Re: [U2] XML mapping to multiple files records Why two files? That would be the approach with a SQL type database, but in Universe, you can make the track data multi-valued related fields in the albums file. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:38 AM To: U2 Users List Subject: [U2] XML mapping to multiple files records Hi Folks, Here's a scenario for you: Let's say there is an XML file containing album track data that we'd like to import into 2 different Universe files. A sample layout might be something like: albums album album_ID/ album_title/ album_total_runtime/ album_total_tracks/ tracks track number=1 track_ID/ track_title/ track_artist/ /track track number=2 track_ID/ track_title/ track_artist/ /track /tracks album /albums What I'm trying to do is have an ALBUMS file and a TRACKS file. I want a single record in the ALBUMS file for each album and a record in the TRACKS file for each track. Essentially every album record in the XML will product one ALBUMS record and potentially multiple TRACKS records. The trouble I'm having is getting more than one TRACKS record. I'm wondering if anyone has ever tried this before and how their experience went. I end up with just one TRACKS record with the first iteration. Is what I'm trying even possible? I've opened a case with IBM as well but figured maybe one of you has been in this situation before. - Josh ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
[U2] XML mapping to multiple files records
Hi Folks, Here's a scenario for you: Let's say there is an XML file containing album track data that we'd like to import into 2 different Universe files. A sample layout might be something like: albums album album_ID/ album_title/ album_total_runtime/ album_total_tracks/ tracks track number=1 track_ID/ track_title/ track_artist/ /track track number=2 track_ID/ track_title/ track_artist/ /track /tracks album /albums What I'm trying to do is have an ALBUMS file and a TRACKS file. I want a single record in the ALBUMS file for each album and a record in the TRACKS file for each track. Essentially every album record in the XML will product one ALBUMS record and potentially multiple TRACKS records. The trouble I'm having is getting more than one TRACKS record. I'm wondering if anyone has ever tried this before and how their experience went. I end up with just one TRACKS record with the first iteration. Is what I'm trying even possible? I've opened a case with IBM as well but figured maybe one of you has been in this situation before. - Josh ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] XML mapping to multiple files records
Why two files? That would be the approach with a SQL type database, but in Universe, you can make the track data multi-valued related fields in the albums file. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:38 AM To: U2 Users List Subject: [U2] XML mapping to multiple files records Hi Folks, Here's a scenario for you: Let's say there is an XML file containing album track data that we'd like to import into 2 different Universe files. A sample layout might be something like: albums album album_ID/ album_title/ album_total_runtime/ album_total_tracks/ tracks track number=1 track_ID/ track_title/ track_artist/ /track track number=2 track_ID/ track_title/ track_artist/ /track /tracks album /albums What I'm trying to do is have an ALBUMS file and a TRACKS file. I want a single record in the ALBUMS file for each album and a record in the TRACKS file for each track. Essentially every album record in the XML will product one ALBUMS record and potentially multiple TRACKS records. The trouble I'm having is getting more than one TRACKS record. I'm wondering if anyone has ever tried this before and how their experience went. I end up with just one TRACKS record with the first iteration. Is what I'm trying even possible? I've opened a case with IBM as well but figured maybe one of you has been in this situation before. - Josh ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users
Re: [U2] XML mapping to multiple files records
The scenario and sample I posted is theoretical. The actual data structure is much larger and has way too many nested levels. Unfortunately splitting data is a must. The two files piece is working fine it's just the multiple records in the second file that's an issue. - Josh -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Larry Hiscock Sent: Tuesday, June 23, 2009 1:42 PM To: 'U2 Users List' Subject: Re: [U2] XML mapping to multiple files records Why two files? That would be the approach with a SQL type database, but in Universe, you can make the track data multi-valued related fields in the albums file. Larry Hiscock Western Computer Services -Original Message- From: u2-users-boun...@listserver.u2ug.org [mailto:u2-users-boun...@listserver.u2ug.org] On Behalf Of Joshua Gallant Sent: Tuesday, June 23, 2009 10:38 AM To: U2 Users List Subject: [U2] XML mapping to multiple files records Hi Folks, Here's a scenario for you: Let's say there is an XML file containing album track data that we'd like to import into 2 different Universe files. A sample layout might be something like: albums album album_ID/ album_title/ album_total_runtime/ album_total_tracks/ tracks track number=1 track_ID/ track_title/ track_artist/ /track track number=2 track_ID/ track_title/ track_artist/ /track /tracks album /albums What I'm trying to do is have an ALBUMS file and a TRACKS file. I want a single record in the ALBUMS file for each album and a record in the TRACKS file for each track. Essentially every album record in the XML will product one ALBUMS record and potentially multiple TRACKS records. The trouble I'm having is getting more than one TRACKS record. I'm wondering if anyone has ever tried this before and how their experience went. I end up with just one TRACKS record with the first iteration. Is what I'm trying even possible? I've opened a case with IBM as well but figured maybe one of you has been in this situation before. - Josh ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users ___ U2-Users mailing list U2-Users@listserver.u2ug.org http://listserver.u2ug.org/mailman/listinfo/u2-users