Received: from ultra.hss.co.in ([192.168.100.5]) by sandesh.hss.hns.com (Lotus SMTP MTA v4.6.3  (733.2 10-16-1998)) with SMTP id 65256C55.00358B61; Thu, 17 Oct 2002 15:14:50 +0530
Received: from hindon.hss.co.in (localhost [127.0.0.1])
	by ultra.hss.co.in (8.10.0/8.10.0) with ESMTP id g9H9pYl06546
	for <awakankar@ultra.hss.hns.com>; Thu, 17 Oct 2002 15:21:34 +0530 (IST)
Received: from hindon.hss.co.in (localhost [127.0.0.1])
	by hindon.hss.co.in (8.10.0/8.10.0) with ESMTP id g9H9o8M05006
	for <awakankar@ultra.hss.hns.com>; Thu, 17 Oct 2002 15:20:08 +0530 (IST)
Received: from apache.org (daedalus.apache.org [63.251.56.142])
	by hindon.hss.co.in (8.10.0/8.10.0) with SMTP id g9H9o5l05002
	for <awakankar@hss.hns.com>; Thu, 17 Oct 2002 15:20:06 +0530 (IST)
Received: (qmail 45321 invoked by uid 500); 17 Oct 2002 09:49:58 -0000
Mailing-List: contact xerces-c-dev-help@xml.apache.org; run by ezmlm
Precedence: bulk
Reply-To: xerces-c-dev@xml.apache.org
list-help: <mailto:xerces-c-dev-help@xml.apache.org>
list-unsubscribe: <mailto:xerces-c-dev-unsubscribe@xml.apache.org>
list-post: <mailto:xerces-c-dev@xml.apache.org>
Delivered-To: mailing list xerces-c-dev@xml.apache.org
Received: (qmail 45310 invoked from network); 17 Oct 2002 09:49:57 -0000
Date: Thu, 17 Oct 2002 10:50:09 +0100 (BST)
From: Gareth Reakes <gareth@decisionsoft.com>
X-X-Sender: gareth@somme.dsl.local
To: xerces-c-dev@xml.apache.org
Subject: Re: Parsing XML and extracting data in data structures
In-Reply-To: <65256C55.0031F43E.00@sandesh.hss.hns.com>
Message-ID: <Pine.LNX.4.44.0210171048160.1473-100000@somme.dsl.local>
MIME-Version: 1.0
Content-Type: TEXT/PLAIN; charset=US-ASCII
X-Loop: systemfilter.decisionsoft.com
X-Spam-Rating: daedalus.apache.org 1.6.2 0/1000/N

On Thu, 17 Oct 2002 awakankar@hss.hns.com wrote:

> 
> 
> Hi,
> I have got an XML document in memory and I would like to extract data out of the
> XML file into data-structures of my own. I need to extract whole of the XML file
> into data structure and not part of the XML file. Can anyone
> 1)Provide me with a sample program/code to do the same. It does not seem that
> any of the samples accompaing the code does this, specially using DOM.

DOM does take the entire XML file and put it into a data structure in 
memory. What about the DOM does not suit your needs?


> 2)Suggest which would be a better approach SAX or DOM? Note that I donot want to
> manipulate the data. I just want to extract the data and put it into data
> structures. I guess SAX would be faster.

SAX will probably be faster if you don't need the overhead of a complete 
DOM in memory. What kind of data are you trying to extract from the XML 
file?


Gareth

-- 
Gareth Reakes, Head of Product Development  
DecisionSoft Ltd.            http://www.decisionsoft.com
Office: +44 (0) 1865 203192



---------------------------------------------------------------------
To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xerces-c-dev-help@xml.apache.org

