You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by Tatiana Almeida Souza Coelho <ta...@dcc.ufmg.br> on 2000/06/16 19:12:39 UTC

Question

I would like to know if there is any mapping between the  "DOM tree" and
the XML file. What can I do to know the physical position of an XML
content node in the XML file?

--
Tatiana Almeida Souza Coelho -  tasc@dcc.ufmg.br
Mestrado em Ciência da Computação - DCC/UFMG
Áreas de interesse: Recuperação de Informação
                    Banco de Dados




Re: Question

Posted by Dean Roddey <dr...@charmedquark.com>.
That information is not currently stored because of the large overhead it
could create relative to the number of people who want it. The general
answer to things like this is:

1. Set up a map collection
2. Add the address of each node to the map as the key
3. The data storage for each key is whatever you want to store
4. Derive from DOMParser, override startElement() and endElement()
5. When you get those calls, query the currect location, store it in the map
against the current node.

Its hardly simple, but adding anything to the DOM is a big deal, since
massive effort has been made to remove things, because of the already too
high overhead it tends to have.

--------------------------
Dean Roddey
The CIDLib C++ Frameworks
Charmed Quark Software
droddey@charmedquark.com
http://www.charmedquark.com

"You young, and you gotcha health. Whatchoo wanna job fer?"


----- Original Message -----
From: "Tatiana Almeida Souza Coelho" <ta...@dcc.ufmg.br>
To: <xe...@xml.apache.org>
Sent: Friday, June 16, 2000 10:12 AM
Subject: Question


> I would like to know if there is any mapping between the  "DOM tree" and
> the XML file. What can I do to know the physical position of an XML
> content node in the XML file?
>
> --
> Tatiana Almeida Souza Coelho -  tasc@dcc.ufmg.br
> Mestrado em Ciência da Computação - DCC/UFMG
> Áreas de interesse: Recuperação de Informação
>                     Banco de Dados
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: xerces-c-dev-unsubscribe@xml.apache.org
> For additional commands, e-mail: xerces-c-dev-help@xml.apache.org
>