[XML-SIG] Help parsing XML

Uche Ogbuji Uche.Ogbuji at fourthought.com
Thu Mar 31 19:25:45 CEST 2005


On Tue, 2005-03-29 at 15:33 -0600, Greg Lindstrom wrote:
> Hello-
> I have a general (I guess) xml parsing question that I hope has an 
> answer.  I am busy parsing health care claim records using xpath and do 
> not see a way to parse the following (stripped down) file (I've added 
> lines to group my problem...)
> 
> 1.  + <seg id='ST'>
> 2.  + <loop id='HEADER'>
> 3.  - <loop id='DETAIL'>
> 4.    - <loop id='2000A'>
> 5.      + <seg id='HL'>
> 6.      + <loop id='2000AA'>
> 7.      + <loop id='2000B'>
> 8.        + <seg id='HL'>   --------+
> 9.        + <seg id='SBR'>          |
> 10.       + <loop id='2010BA'>      | Group 1
> 11.       + <loop id='2010BB'>      |
> 12.       + <loop id='2300'>   -----+
> 13.       + <seg id='HL'>  ---------+
> 14.       + <seg id='SBR'>          |
> 15.       + <loop id='2010BA'>      |
> 16.       + <loop id='2010BB'>      | Group 2
> 17.       + <loop id='2300'>   -----+
> 18.               </loop>
> 19.           </loop>
> 20.       </loop>

BTW, Ugh.  Smells like EDI inconsiderately yanked into XML form.

There's another circle in Inferno for people who perpetrate such XML
design.


-- 
Uche Ogbuji                                    Fourthought, Inc.
http://uche.ogbuji.net    http://4Suite.org    http://fourthought.com
Use CSS to display XML, part 2 - http://www-128.ibm.com/developerworks/edu/x-dw-x-xmlcss2-i.html
Writing and Reading XML with XIST - http://www.xml.com/pub/a/2005/03/16/py-xml.html
Use XSLT to prepare XML for import into OpenOffice Calc - http://www.ibm.com/developerworks/xml/library/x-oocalc/
Be humble, not imperial (in design) - http://www.adtmag.com/article.asp?id=10286
State of the art in XML modeling - http://www.ibm.com/developerworks/xml/library/x-think30.html



More information about the XML-SIG mailing list