This is Interesting: Free Magazines for Graphics designers and webmasters
Home > Archive > Microsoft XML > March 2005 > Re: How to read a value which is equivalent ot a key field i have
You are viewing an archived Text-only version of the thread.
To view this thread in it's original format and/or if you want to reply to
this thread please [click here]
| Author |
Re: How to read a value which is equivalent ot a key field i have
|
|
| Martin Honnen 2005-03-29, 7:29 am |
|
Prabhudhas Peter wrote:
> I want to read or fetch the string value in an XML file corresponding
> to a key field which i've given as an input...but i don't want to parse all
> the elements and nodes of that XML file...but straight away i've to fetch the
> value....
Well if you have an XML file in the file system then surely to read out
a value some parser has to read through the file until the value is
found. So while you don't need to build an XML DOM document of the whole
XML file if all you want is one value you need to read through the file,
you could do it with SAX parsing (Java, MSXML with VB for instance) or
with XmlTextReader parsing (.NET).
So decide on the tools (MSXML or DOM) that you want or can use, then
give some more details on how the key looks, how the desired output
looks and probably someone here can help you further.
--
Martin Honnen
http://JavaScript.FAQTs.com/
| |
| Prabhudhas Peter 2005-03-30, 12:08 am |
| ThanX for ur reply...
I don't have indepth knowledge in XML but i need a solution in either way ie
by
MSXML or DOM..... but it should be a simple one...
Peter
"Martin Honnen" wrote:
>
>
> Prabhudhas Peter wrote:
>
>
> Well if you have an XML file in the file system then surely to read out
> a value some parser has to read through the file until the value is
> found. So while you don't need to build an XML DOM document of the whole
> XML file if all you want is one value you need to read through the file,
> you could do it with SAX parsing (Java, MSXML with VB for instance) or
> with XmlTextReader parsing (.NET).
> So decide on the tools () that you want or can use, then
> give some more details on how the key looks, how the desired output
> looks and probably someone here can help you further.
>
>
> --
>
> Martin Honnen
> http://JavaScript.FAQTs.com/
>
| |
| Martin Honnen 2005-03-30, 12:08 am |
|
Prabhudhas Peter wrote:
> I don't have indepth knowledge in XML but i need a solution in either way ie
> by
> MSXML or DOM..... but it should be a simple one...
MSXML can do DOM or (at least with VB or C++) SAX too, as said, DOM is
overhead if you only want to read out one value.
But it is you who has to decide whether he can or wants to use VB or
C++, documentation for SAX with MSXML is here:
<http://msdn.microsoft.com/library/d...de_Overview.asp>
--
Martin Honnen
http://JavaScript.FAQTs.com/
|
|
|
| | Copyright 2003 - 2008 forum4designers.com Software forum Computer Hardware reviews |
|