🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.jbuilder.xml
Article #32

Parsing XML doc having Schema ... /Schema and then data ... /data

#32
From: Magnus
Date: Thu, 14 Apr 2005 01:48
41 lines
2172 bytes
Hello!

I have a XML doc with the layout as inserted below. When I looked at the 
examples I got for SAX and DOM parsing the structure described was 
something like:
<TAG>text</TAG>
SAX would trigger events and I can pick up "text" and DOM will build a 
tree that I can traverse and find the "text".

Is there a function I missed? Is there other ways to parse XML docs as 
below?

Thanks in advance,

Magnus

--- example ---

<xml>
    <s:Schema id="RSchema">
	<s:ElementType name="row" content="y" rs:updatable="true">
	<s:AttributeType name="DOC" rs:number="1" rs:writeunknown="true" 
rs:basetable="DDATA" rs:basecolumn="DOC">
<s:datatype dt:type="string" rs:dbtype="str" dt:maxLength="32" 
rs:maybenull="false"/>
         </s:AttributeType>

... more attributTypes ...

        <s:extends type="rs:rowbase"/>
     </s:ElementType>
</s:Schema>
<rs:data>
<z:row DOC="A474ED9CFA5D4D779D7DFAB9EEB6BZZ6" 
DATA="d0cf11e0a1b11ae1000000000000000000000000000000003e000300feff09
...
000030000000c01000004000000280100000500000000" DATALENGTH="999" 
INUSE="0" CREATED="2005-01-01T01:01:01" UPDATED="2005-01-01T01:01:01" 
ROWID="SDAJJXAAWAAAAy8ZZ"/>
</rs:data>
</xml>
Technical Details
Message-ID: <425dcbff@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: fcb34,4f3bee40c6d816bc,start
X-Google-Attributes: gidfcb34,public
X-Google-Language: ENGLISH,ASCII-7-bit
Date: Wed, 13 Apr 2005 21:48:52 -0400
From: Magnus <magnus_bjorkman@iwon.com>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.2) Gecko/20040804 Netscape/7.2 (ax)
X-Accept-Language: en-us, en, sv
MIME-Version: 1.0
Newsgroups: borland.public.jbuilder.xml
Subject: Parsing XML doc having Schema ... /Schema and then data ... /data
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: 67.76.183.231
Message-ID: <425dcbff@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1113443327 67.76.183.231 (13 Apr 2005 18:48:47 -0800)
Lines: 41
Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!proxad.net!proxad.net!194.117.148.138.MISMATCH!pe2.news.blueyonder.co.uk!blueyonder!news-peer-test!btnet!newsfeed.bt.es!caladan.landsraad.net!newsgroups.borland.com!not-for-mail