473,382 Members | 1,726 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,382 software developers and data experts.

read values from xml node object

Hai,

Our client having one webservice, that return the xmlNode object
as
<Hello>
<First>one</First>
<second>Two</second>
</Hello>

When i call that webservice from vb.net code, it returns the outer
text as <Hello></hellotags.

I cant read the child nodes. object says that child node counts are
0.

Can any one help me, to read all the child elements.

Regards
Raju.

Oct 3 '07 #1
4 5600
"raju" <po*******@gmail.comwrote in message
news:11**********************@w3g2000hsg.googlegro ups.com...
Hai,

Our client having one webservice, that return the xmlNode object
as
<Hello>
<First>one</First>
<second>Two</second>
</Hello>

When i call that webservice from vb.net code, it returns the outer
text as <Hello></hellotags.

I cant read the child nodes. object says that child node counts are
0.

Can any one help me, to read all the child elements.

Regards
Raju.
Well either the XML returned is not what you think it is or your code is
incorrect. Try displaying the OuterXml of the Hello node and if that shows
what you expect then post the actual code you are using. Remember XML is
case-sensitive.

--

Joe Fawcett (MVP - XML)
http://joe.fawcett.name


Oct 3 '07 #2
On Oct 3, 2:08 pm, "Joe Fawcett" <joefawc...@newsgroup.nospamwrote:
"raju" <ponnur...@gmail.comwrote in message

news:11**********************@w3g2000hsg.googlegro ups.com...
Hai,
Our client having one webservice, that return the xmlNode object
as
<Hello>
<First>one</First>
<second>Two</second>
</Hello>
When i call that webservice from vb.net code, it returns the outer
text as <Hello></hellotags.
I cant read the child nodes. object says that child node counts are
0.
Can any one help me, to read all the child elements.
Regards
Raju.

Well either the XML returned is not what you think it is or your code is
incorrect. Try displaying the OuterXml of the Hello node and if that shows
what you expect then post the actual code you are using. Remember XML is
case-sensitive.

--

Joe Fawcett (MVP - XML)http://joe.fawcett.name- Hide quoted text -

- Show quoted text -

Hai Joe,

Thanks for your immediate response and at the same time, for
spending your favourable time for this.

my code
Dim oPTNService As New carbon.CCServices

Dim a As Xml.XmlNode

a = oPTNService.Authenticate("FAE04EC0-301F-25D3-
BF4B-00C04F79EFBC", "god", "rose")

MsgBox("webservice returned a value")
txtResult.Text = a.OuterXml.ToString

MsgBox(a.ChildNodes.Count.ToString)
the txtresult shows as <Hello></hello>.

Regards,
Raju.

Oct 3 '07 #3
raju wrote:
Dim oPTNService As New carbon.CCServices

Dim a As Xml.XmlNode

a = oPTNService.Authenticate("FAE04EC0-301F-25D3-
BF4B-00C04F79EFBC", "god", "rose")

MsgBox("webservice returned a value")
txtResult.Text = a.OuterXml.ToString

MsgBox(a.ChildNodes.Count.ToString)
the txtresult shows as <Hello></hello>.
That is not possible, OuterXml of an XmlElement node is well-formed so
there can't be a start tag <Hellobut an end tag </hello>, it must be
either <hello></helloor <Hello></Hello>.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/
Oct 3 '07 #4
But if it is <Hello></Hellothen it doesn't have any children so your
service or your data is faulty or at least not what you expect.

--

Joe Fawcett (MVP - XML)

http://joe.fawcett.name

"Martin Honnen" <ma*******@yahoo.dewrote in message
news:OC**************@TK2MSFTNGP02.phx.gbl...
raju wrote:
> Dim oPTNService As New carbon.CCServices

Dim a As Xml.XmlNode

a = oPTNService.Authenticate("FAE04EC0-301F-25D3-
BF4B-00C04F79EFBC", "god", "rose")

MsgBox("webservice returned a value")
txtResult.Text = a.OuterXml.ToString

MsgBox(a.ChildNodes.Count.ToString)
the txtresult shows as <Hello></hello>.

That is not possible, OuterXml of an XmlElement node is well-formed so
there can't be a start tag <Hellobut an end tag </hello>, it must be
either <hello></helloor <Hello></Hello>.
--

Martin Honnen --- MVP XML
http://JavaScript.FAQTs.com/

Oct 3 '07 #5

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

Similar topics

1
by: bdinmstig | last post by:
I refined my attempt a little further, and the following code does seem to work, however it has 2 major problems: 1. Very limited support for XPath features Basic paths are supported for...
2
by: kie | last post by:
hello, when i create elements and want to assign events to them, i have realised that if the function assigned to that element has no parameters, then the parent node values can be attained. ...
9
by: B-Dog | last post by:
I'm trying to read two nodes in an xml file that I'm using to store setting but I'm having a hard time trying to read the values of two nodes. Below I can read one node but I need to be able to...
0
by: XML newbie: Urgent pls help! | last post by:
I am using VB.Net. My program is to connect to a remote IPAddress. Once, it verifies the login information it should display the SessionID and enable some button . I appreciate your help and thanku...
9
by: Adi | last post by:
Hello eveyone, I wanna ask a very simple question here (as it was quite disturbing me for a long time.) My problem is to read a file line by line. I've tried following implementations but still...
4
by: Pim75 | last post by:
Hello, I have to read a XML file in ASP and save the values in a database. I can get this work, but I cannot read some nested nodes of the xml file. This is a part of the XML file: ...
6
by: | last post by:
Hi, I'm steel trying to read and update my XML file with Visual Basic Express but i am unable to find the right way to read my xml file and update it if neccessary... Here is my problem :...
0
by: Kavitha Sudhershan | last post by:
hi, i wanna read the node values from xml. As per my code i can read the node values in first child node and for the next node am not able to read the node values. pls help me. i'll paste the code...
13
by: rohit | last post by:
Hi All, I am new to C language.I want to read integers from a text file and want to do some operation in the main program.To be more specific I need to multiply each of these integers with another...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

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.