473,232 Members | 1,552 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,232 software developers and data experts.

extracting a XML segment (element)

AA
Hello, I need to extract an element from a xml document something like this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA
Nov 12 '05 #1
9 4310
AA
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be)
and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like this
<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub elements) located inside the Body element.

How can I do that?

Thanks a lot again!

AA

Nov 12 '05 #2
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to work
with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be)
and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like this
<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub elements) located inside the Body element.

How can I do that?

Thanks a lot again!

AA


Nov 12 '05 #3
AA
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to work
with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be)
and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like

this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub

elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA


Nov 12 '05 #4
If you are working with XML and XSLT then you will undoubtedly use an XMLDOM
in almost every scenario - that's what it's for. If you don't then you are
back to the Stone Age using string parsing techniques and regular
expressions.
If you can then try and use the latest version of MSXML by detecting and
using version specific ProgIDs 0 MSXML v4.0 is a lot faster than v3.0.
Saying that, they are both quick, *very* powerful, and relatively
lightweight as far as COM objects go.

Chris.
"AA" <aa@personal.net.py> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to work
with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be)
and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like

this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub

elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA



Nov 12 '05 #5
I've actually heard that DOM is old and needs to retire for most uses.
DOM is heavy and using XmlReader is lighter and faster, so I've heard :)

In practice though, if your source xml is small, I'd say use XmlDocument if
processing a stream or a large document, use XmlReader.

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
If you are working with XML and XSLT then you will undoubtedly use an XMLDOM in almost every scenario - that's what it's for. If you don't then you are
back to the Stone Age using string parsing techniques and regular
expressions.
If you can then try and use the latest version of MSXML by detecting and
using version specific ProgIDs 0 MSXML v4.0 is a lot faster than v3.0.
Saying that, they are both quick, *very* powerful, and relatively
lightweight as far as COM objects go.

Chris.
"AA" <aa@personal.net.py> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to work with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be) and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like

this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub

elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA



Nov 12 '05 #6
Well if your talking .NET then I can't say - I have no current experience
with XML in .NET (yet).

Still, I have Xselerator and the timings for even the most complex of XSLT
transforms are pretty damned quick. Certainly quick enough for me to believe
that using an XMLDOM is not going to seriously damage the speed of my apps /
web stuff. At the end of the day, it's still just another COM component.

I'd like to know where you got 'DOM is old and needs to retire for most
uses' from. I've never heard that in all the last three years of working
with XML so I'm intrigued as to who may have said it. There are ways of
making anything run slow but a little understanding of how the parser works
can go a long way. As far as I am aware, MSXML v4.0 is pretty near the top
in terms of speed for both DOM and XSLT.

MSXML performance:
http://msdn.microsoft.com/library/de...ml02212000.asp

Chris.

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I've actually heard that DOM is old and needs to retire for most uses.
DOM is heavy and using XmlReader is lighter and faster, so I've heard :)

In practice though, if your source xml is small, I'd say use XmlDocument if
processing a stream or a large document, use XmlReader.

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
If you are working with XML and XSLT then you will undoubtedly use an XMLDOM in almost every scenario - that's what it's for. If you don't then you are
back to the Stone Age using string parsing techniques and regular
expressions.
If you can then try and use the latest version of MSXML by detecting and
using version specific ProgIDs 0 MSXML v4.0 is a lot faster than v3.0.
Saying that, they are both quick, *very* powerful, and relatively
lightweight as far as COM objects go.

Chris.
"AA" <aa@personal.net.py> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to work with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be) and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like

this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub

elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA




Nov 12 '05 #7
Chris,

You're right. MSXML 4.0 is pretty darn fast and even faster than .NET 1.1's
implementation. I read that it was due to the timing of the .NET 1.1 launch
more than anything and .NET 2.0 implementation is supposed to be doubled or
4 times in average XSLT processing.

Here's the link to the improvements in 2.0 release:
http://msdn.microsoft.com/xml/defaul...SysXMLVS05.asp

The article also spends some time on DOM API versus .NET's pull model(#3).
Maybe I'm blindly taking one guy's opinion as gospel but it's hard not to
when the person is the lead program manager for "Microsoft's WebData team,
which develops Microsoft's data access technologies including the components
within the System.Xml and System.Data namespaces of the .NET Framework,
Microsoft XML Core Services (MSXML) and Microsoft Data Access Components
(MDAC). "

Apparently many people in this newsgroup believe that's true as well - that
XPathDocument/XmlReader is preferred over XmlDocument(DOM).

According to him though, DOM isn't going away and I don't think I meant to
say that it is going away any time soon. I still use it myself.
I can't find the other article where the author more or less said "DOM is
old...". I am sure that he meant it jokingly as one proponent of the
XPathDocument might say.
I am very excited about XML 2.0 and can't wait for it to be released myself.

As for your lack of experience in System.Xml, why not?! It's great stuff!
I am no expert in Xml technology and I am getting so much done so easily
even though there are some hurdles in v1.1.

Cheers,
Jiho

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Well if your talking .NET then I can't say - I have no current experience
with XML in .NET (yet).

Still, I have Xselerator and the timings for even the most complex of XSLT
transforms are pretty damned quick. Certainly quick enough for me to believe that using an XMLDOM is not going to seriously damage the speed of my apps / web stuff. At the end of the day, it's still just another COM component.

I'd like to know where you got 'DOM is old and needs to retire for most
uses' from. I've never heard that in all the last three years of working
with XML so I'm intrigued as to who may have said it. There are ways of
making anything run slow but a little understanding of how the parser works can go a long way. As far as I am aware, MSXML v4.0 is pretty near the top
in terms of speed for both DOM and XSLT.

MSXML performance:
http://msdn.microsoft.com/library/de...ml02212000.asp
Chris.

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I've actually heard that DOM is old and needs to retire for most uses.
DOM is heavy and using XmlReader is lighter and faster, so I've heard :)

In practice though, if your source xml is small, I'd say use XmlDocument if processing a stream or a large document, use XmlReader.

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
If you are working with XML and XSLT then you will undoubtedly use an

XMLDOM
in almost every scenario - that's what it's for. If you don't then you are
back to the Stone Age using string parsing techniques and regular
expressions.
If you can then try and use the latest version of MSXML by detecting and
using version specific ProgIDs 0 MSXML v4.0 is a lot faster than v3.0.
Saying that, they are both quick, *very* powerful, and relatively
lightweight as far as COM objects go.

Chris.
"AA" <aa@personal.net.py> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to

work with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come <Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be) and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
> Hello, I need to extract an element from a xml document something like this
>
> <myXml>
> <Header>
> <Name/>
> <LastName/>
> <Age/>
> </Head>
> <Body>
> <Properties>
> <Address/>
> <Location/>
> <Country>
> </Properties>
> </Body>
> </myXml>
>
>
> I need to extract from my Stream the <Properties> element (and sub
elements)
> located inside the Body element.
>
> How can I do that?
>
> Thanks a lot again!
>
> AA
>
>



Nov 12 '05 #8
My lack of .NET stuff is mainly that I'm still completing development of a
web based GIS application using VB 6.0 COM components and although I would
love to move to .NET it's just not feasible for me at present apart from on
my own time.

I like the prospective speed increase for .NET 2.0 as opposed to .NET 1.1
but as they said, DOM isn't going to go away and for smaller documents <
250Kb it's a perfect easy to use implementation. For XSLT it's still about
50 times faster and a lot less work than the equivalent ASP code. I know, I
produced 20 reports in a day from XSLT and about 4 different XML documents
that would probably have taken me at least a week to even start debugging in
generic ASP and VBScript. XSLT is amazing (as we both probably know).

Cheers for the insight into .NET 2.0.

Chris.

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:uj**************@TK2MSFTNGP09.phx.gbl...
Chris,

You're right. MSXML 4.0 is pretty darn fast and even faster than .NET 1.1's
implementation. I read that it was due to the timing of the .NET 1.1 launch
more than anything and .NET 2.0 implementation is supposed to be doubled or
4 times in average XSLT processing.

Here's the link to the improvements in 2.0 release:
http://msdn.microsoft.com/xml/defaul...SysXMLVS05.asp

The article also spends some time on DOM API versus .NET's pull model(#3).
Maybe I'm blindly taking one guy's opinion as gospel but it's hard not to
when the person is the lead program manager for "Microsoft's WebData team,
which develops Microsoft's data access technologies including the components
within the System.Xml and System.Data namespaces of the .NET Framework,
Microsoft XML Core Services (MSXML) and Microsoft Data Access Components
(MDAC). "

Apparently many people in this newsgroup believe that's true as well - that
XPathDocument/XmlReader is preferred over XmlDocument(DOM).

According to him though, DOM isn't going away and I don't think I meant to
say that it is going away any time soon. I still use it myself.
I can't find the other article where the author more or less said "DOM is
old...". I am sure that he meant it jokingly as one proponent of the
XPathDocument might say.
I am very excited about XML 2.0 and can't wait for it to be released myself.

As for your lack of experience in System.Xml, why not?! It's great stuff!
I am no expert in Xml technology and I am getting so much done so easily
even though there are some hurdles in v1.1.

Cheers,
Jiho

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:%2****************@TK2MSFTNGP09.phx.gbl...
Well if your talking .NET then I can't say - I have no current experience
with XML in .NET (yet).

Still, I have Xselerator and the timings for even the most complex of XSLT
transforms are pretty damned quick. Certainly quick enough for me to believe that using an XMLDOM is not going to seriously damage the speed of my apps / web stuff. At the end of the day, it's still just another COM component.

I'd like to know where you got 'DOM is old and needs to retire for most
uses' from. I've never heard that in all the last three years of working
with XML so I'm intrigued as to who may have said it. There are ways of
making anything run slow but a little understanding of how the parser works can go a long way. As far as I am aware, MSXML v4.0 is pretty near the top
in terms of speed for both DOM and XSLT.

MSXML performance:
http://msdn.microsoft.com/library/de...ml02212000.asp
Chris.

"Jiho Han" <ji******@infinityinfo.com> wrote in message
news:%2****************@tk2msftngp13.phx.gbl...
I've actually heard that DOM is old and needs to retire for most uses.
DOM is heavy and using XmlReader is lighter and faster, so I've heard :)

In practice though, if your source xml is small, I'd say use XmlDocument if processing a stream or a large document, use XmlReader.

"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eu**************@TK2MSFTNGP09.phx.gbl...
If you are working with XML and XSLT then you will undoubtedly use an

XMLDOM
in almost every scenario - that's what it's for. If you don't then you are
back to the Stone Age using string parsing techniques and regular
expressions.
If you can then try and use the latest version of MSXML by detecting and
using version specific ProgIDs 0 MSXML v4.0 is a lot faster than v3.0.
Saying that, they are both quick, *very* powerful, and relatively
lightweight as far as COM objects go.

Chris.
"AA" <aa@personal.net.py> wrote in message
news:O$**************@TK2MSFTNGP10.phx.gbl...
Thanks Chris!

But DOM is not too heavy? is really necesary? is the only way?

:)

Thanks anyway

AA
"Chris Barber" <ch***@blue-canoe.co.uk.NOSPAM> wrote in message
news:eJ**************@TK2MSFTNGP10.phx.gbl...
Load the XML into a DOM and then do:

'Return the first child of the body element.
Dim pstrXML, pstrXPath
pstrXPath = "/myXml/Body/*[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

or ...

'Return the properties element wherever it may be (first instance).
Dim pstrXML, pstrXPath
pstrXPath = "//Properties[1]"
pstrXML = DOM.selectSingleNode(pstrXPath).xml

** Beware, the Xpath is case sensitive.

You can then use this XML and load it into another DOM if you want to

work with it as a document / apply XSLT to it etc.

Chris.

"AA" <aa@personal.net.py> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come <Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be) and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
> Hello, I need to extract an element from a xml document something like this
>
> <myXml>
> <Header>
> <Name/>
> <LastName/>
> <Age/>
> </Head>
> <Body>
> <Properties>
> <Address/>
> <Location/>
> <Country>
> </Properties>
> </Body>
> </myXml>
>
>
> I need to extract from my Stream the <Properties> element (and sub
elements)
> located inside the Body element.
>
> How can I do that?
>
> Thanks a lot again!
>
> AA
>
>




Nov 12 '05 #9
A better API than the DOM is the XPathDocument/XPathNavigator. It will be
the preferred API in .NET v2.0 also.
If you need to deserialize objects from the XML by performing an XPath
query, you can use the following:

XmlSerializer ser = new XmlSerializer(typeof(publishers));

XPathDocument doc = new XPathDocument("pubs.xml"));
XPathNavigator nav = doc.CreateNavigator();
// Select all publishers
XPathNodeIterator it = nav.Select("/dsPubs/publishers");
while (it.MoveNext())
{
XPathNavigatorReader reader = new XPathNavigatorReader(it.Current);
object pub = ser.Deserialize(reader);
Console.Write(pub);
}

You can perform any complex XPath query and deserialize later using the
XPathNavigatorReader. You can read about this class in
http://weblogs.asp.net/cazzu/archive...19/115966.aspx
NOTE: this class is part of the opensource Mvp.Xml project, which is being
developed by MVPs in XML worldwide. Download the project source from
SourceForge at
http://prdownloads.sourceforge.net/m...l.zip?download

HTH,
/kzu
"AA" <aa@personal.net.py> wrote in message
news:#u**************@TK2MSFTNGP12.phx.gbl...
I forgot to mention that the element <Properties> could vary, could come
<Profesion> instead of <Properties> could come any element, but always
something come in that place. I need to extract the element (whatever be)
and convert into Object (deserializing the xml)

Thanks a lot
"AA" <aa@personal.net.py> wrote in message
news:%2******************@TK2MSFTNGP11.phx.gbl...
Hello, I need to extract an element from a xml document something like

this

<myXml>
<Header>
<Name/>
<LastName/>
<Age/>
</Head>
<Body>
<Properties>
<Address/>
<Location/>
<Country>
</Properties>
</Body>
</myXml>
I need to extract from my Stream the <Properties> element (and sub

elements)
located inside the Body element.

How can I do that?

Thanks a lot again!

AA


---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.655 / Virus Database: 420 - Release Date: 09/04/2004
Nov 12 '05 #10

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Porthos | last post by:
Hi All, I've been working on mining data from a schema file (all attribute data so far) and have come to the point where I need to get information that is contained in tags. For instance,...
13
by: Kosio | last post by:
Hello, I know of a way to extract digits from a number using the %10 and divide by 10. But I am wondering if there is an algorithm out there that does not use a divide by 10 feature. The...
14
by: Adnan Siddiqi | last post by:
Hi Suppose I have following URLs comming from an HTML document <a href="http://mydomain1.com">Domain1</a> <a...
2
by: chris_j_adams | last post by:
Hi, I'm slowly discovering the world of JavaScript, so I'm not sure I'm attacking this problem in the right manner, thus if I'm in the wrong newsgroup, my apologies. What I'm trying to do is...
5
by: druberego | last post by:
I read google and tried to find the solution myself. YES I do know that you can get undefined references if you: a) forget to implement the code for a prototype/header file item, or b) you forget...
4
by: dexter48 | last post by:
Hi I'm searching for a string occurance in a text file. I find the string ok and write the results to a log file. But on the line above is also some information I need. How can i get that. The string...
1
by: mr t | last post by:
The DataTable xml written out, produces the following xml. can anyone show me how to extract that schema and put it in external file? the reason for this, is that I want to apply that structure to...
13
by: biplab | last post by:
for(i=0;i<256;i++) { hist=0; } for(i=0;i<height;i++) { for(j=0;j<width;j++) { k=(long int)rgb1; hist=hist+1;
3
by: madshov | last post by:
Hi, I have the following: <start> <segment Id="AAA"> <element Id="id">1</element> <element Id="seq">122</element> <element Id="seq2" Composite="yes">
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.