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></hello> tags.

  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.

0
ponnurajs (2)
10/3/2007 8:38:30 AM
dotnet.xml 7266 articles. 0 followers. Follow

4 Replies
511 Views

Similar Articles

[PageSpeed] 2

"raju" <ponnurajs@gmail.com> wrote in message 
news:1191400710.821099.315630@w3g2000hsg.googlegroups.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></hello> tags.
>
>  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




0
10/3/2007 9:08:54 AM
On Oct 3, 2:08 pm, "Joe Fawcett" <joefawc...@newsgroup.nospam> wrote:
> "raju" <ponnur...@gmail.com> wrote in message
>
> news:1191400710.821099.315630@w3g2000hsg.googlegroups.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></hello> tags.
>
> >  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.

0
ponnurajs (2)
10/3/2007 9:17:57 AM
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 <Hello> but an end tag </hello>, it must be 
either <hello></hello> or <Hello></Hello>.


-- 

	Martin Honnen --- MVP XML
	http://JavaScript.FAQTs.com/
0
mahotrash (1778)
10/3/2007 12:23:22 PM
But if it is <Hello></Hello> then 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" <mahotrash@yahoo.de> wrote in message 
news:OCErzgbBIHA.1168@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 <Hello> but an end tag </hello>, it must be 
> either <hello></hello> or <Hello></Hello>.
>
>
> -- 
>
> Martin Honnen --- MVP XML
> http://JavaScript.FAQTs.com/ 


0
10/3/2007 5:03:46 PM
Reply:

Similar Artilces:

xml config file...
hello, I ve a Windowsapplication with a configuration file app.config... (it's in xml) code app.config: <?xml version="1.0" encoding="utf-8" ?> <configuration> <configSections> <section name = "MyNameValueSection" type="System.Configuration.NameValueSectionHandler" /> </configSections> <MyNameValueSection> <add key="MyKey" value="MyValue" /> </MyNameValueSection> <appSettings> <add key="test" value="MeinInhalt" /> </appSettings> </configurati...

Finding Values in a "Matrix"
I have a matrix I have created in Excel. I am using this for correlations. I have cells B1 through G1 filled with text names (the same values as A2 through A7). In the matrix fields I calulate their correlations. In a seperate field, say J1, I am calculating the highest correlation value from my matrix. What I would like to do in cells K1 and/or L1 is find the corresponding text names for that high correlation. So for example if cell E1 is Red and cell A2 is Magenta and their correlation is .95, the highest in the matrix, Cell J1 calculates .95. I would like cell(s) K1 and/or L1...

Reading .wks file
Greetings...according to the Excel "help" file, as well as the file extension listing, I *should* be able to read an *.wks file, but Excel insists that it cannot. I am pretty sure the file was created in Microsoft Works. Is there a converter somewhere that I can download/install? Cheers - S2 Excel can read Works 2.0, not later. You have to save them in Works as excel files or Works 2.0 or get a commercial converter. -- Regards, Peo Sjoblom "Skip Stocks" <anonymous@discussions.microsoft.com> wrote in message news:AFC110E0-641D-4D87-9464-B930CC41CF02@microsoft....

Public variable does not retain value
Hi Folks, I have a VBA module that: 1) creates a custom spreadsheet 2) creates a temporary command bar 3) adds vba code to the workbook module for specific events 4) controls toolbars per work sheet using event handlers When the new custom sheet is created a toolbar is created (if not already in existence). Near the end of the main module, to activate the toolbar, I am using Code: -------------------- Worksheets(2).Activate Worksheets(1).Activate -------------------- thus triggering the "Workbook_SheetActivate" code (which is created/added by the mainsubroutine ). The...

File won't open as read only
I have a file that is in use, but another person opens it and it doeasn't display the "file is in use" message. Is there a setting or fix? Hi have you shared this file? -- Regards Frank Kabel Frankfurt, Germany John wrote: > I have a file that is in use, but another person opens it > and it doeasn't display the "file is in use" message. Is > there a setting or fix? The file is on a network share. The share has all the appropriate permissions. >-----Original Message----- >Hi >have you shared this file? > >-- >Regards >Frank Ka...

Do not display Zero values
Hi All I have two columns, in the first i have numbers, next labels. I need to make a pie chart that ignores all numbers (and respective labels) that are zero. Is there a way to do that? Thanks in advance! Stan Hi Stan, Check the example and the Alternative link example. http://www.andypope.info/charts/piezeros.htm Cheers Andy Stan Altshuller wrote: > Hi All > > I have two columns, in the first i have numbers, next labels. > I need to make a pie chart that ignores all numbers (and respective labels) > that are zero. > > Is there a way to do that? > > Tha...

Getting rid of the formula but keep the Value
I have created a PRODUCT formula linked with certain cells and inputed the values elsewhere on the spreadsheet. However, whenever I cut and paste the values on another worsksheet or program, the formula shows up and not the value. Is there a way to keep the value when transferring it to another location? Copy>Paste Special>Values should work. >-----Original Message----- > >I have created a PRODUCT formula linked with certain cells >and inputed the values elsewhere on the spreadsheet. > >However, whenever I cut and paste the values on another >worskshee...

Read mail arn't marked as read anymore
After an SP upgrade of my Office 2000 the priviewed mail doesnt get marked as read anymore. I have tried to change the time (Tools->Options->Priview pane) from 2 -> 3 -> 4 seconds but nothing works. The only way to mark a mail as read is either to open it or right click it and chose Mark as read. Since I only use the priview pane this is very anoying for me. Is this a bug or has some setting changed with the SP? ...

Creating array of specific object types dynamically
Hi, little gotcha. Some COM objects requires array of specific type. To give you example, following DOESN'T work: [array]$X = @() However below code works: [int32[]]$X = @() For my framework, array type can be dynamic and I don't know in advance what type it's going to be. So what I would need is below: [$PropertyType[]]$X = @() This doesn't work with error message "Unable to find type". As a workaround, I solved it using following: Invoke-Expression "[$$PropertyType[]]`$Var = @()" This code works as expected, I am just curious if ...

How to give other users read-only access to Calendar
I want to allow the group Everyone to have read-only access to a calendar in a certain mailbox. I can do this by granting the permission 'Full mailbox access' (under 'Mailbox rights', under 'Exchange Advanced', for the particular user). However this also allows people to to do everything (ie: they become read-write users). I notice that every mailbox in the system has 'Read permissions' granted to group Everyone. This does not allow other people to open items in the mailbox, but as I understand it, permits Exchange Server and Outlook to do shared meetin...

Binding ASP.NET Menu to XML
I have created a XmlDocument that contains the exact layout that siteMap uses, and then I bind my Menu object to it: Dim xml As XmlDocument xml = DirectCast(Session("MenuData"), XmlDocument) Dim xmlDS As New XmlDataSource() xmlDS.Data = xml.OuterXml MainMenu.DataSource = xmlDS Dim mb As New MenuItemBinding() mb.DataMember = "SiteMapNode" mb.TextField = "Title" mb.NavigateUrlField = "url" MainMenu.DataBindings.Add(mb) MainMenu.DataBind() The problem is when it dis...

Formula to update cell w/ActiveCell.Value?
Can I put a formula in a certain cell that will, on recalculation, update that cell with the value of the current ActiveCell? Ed Ed, Don't think so. But this sub will do it. Paste it into the sheet module. Change the location as necessary. Private Sub Worksheet_SelectionChange(ByVal Target As Range) Application.EnableEvents = False ' prevent retriggering Range("A1") = ActiveCell.Text Application.EnableEvents = True End Sub -- Earl Kiosterud mvpearl omitthisword at verizon period net ------------------------------------------- "Ed" <Ed_Millis@NOSPAM.Ho...

#value error for simple calculation
In cell E6, I have this calculation: =d6*.95. When I have a number in d6, the formula works fine but when I take the number out of d6, I get the #value error. Is there a way around this so that cell E6 is left blank when there's no number in d6? Thanks for any help. Hi Peter embed your formula in an if statement, e.g. =IF(D6="","",d6*.95) Cheers JulieD "Peter McCaul" <compcoff@hotmail.com> wrote in message news:e0yrvnmxEHA.2316@TK2MSFTNGP15.phx.gbl... > In cell E6, I have this calculation: =d6*.95. When I have a number in d6, > the f...

reading confirmation
Good day, I have a problem with outlook. When they send a message to me that demands the shipment of a reading confirmation, even if I accept, the reading confirmation does not come received from the sender. Someone knows from what depends and in which way I can resolve the problem? Thanks for the eventual answers. Niki In news:eht7fo$251$1@fata.cs.interbusiness.it, Niki <nicola.pantaleo@yahoo.it> typed: > Good day, > > I have a problem with outlook. When they send a message to me that > demands the shipment of a reading confirmation, even if I accept, the > read...

"Unblock" feature should be optional when reading e-mail in CRM
When viewing e-mail messages in CRM, a line appears saying "Unblock" to allow the full message content to be read. Can this be made a configurable server or security setting? We are trying to reduce "clicks" as much as possible. ---------------- This post is a suggestion for Microsoft, and Microsoft responds to the suggestions with the most votes. To vote for this suggestion, click the "I Agree" button in the message pane. If you do not see the button, follow this link to open the suggestion in the Microsoft Web-based Newsreader and then click "I Agre...

keep formula after typing in a value in a excel cell
Hi there, my problem is, that i need something like: there is a function in a excel-cell (for example '=setvalue("sqlserver", "DB", "table")'). now i type in a value (for example 100) then the function "setvalue" must write this value (100) in the server, db and table from the parameters. after leaving the cell the formula is still the same and only the value 100 ist visible for the user. and if i go back to the cell than i can see the function in the menubar. there is a product from applix (TM1) and they did it. the problem is, that the souce...

The memory could not be "read".
I'm at work yesterday afternoon responding to e-mail on my desktop, and Adobe pops up from the toolbar with a notice that there is an update available for Acrobat. I accept the download, keep plugging away at my e-mail, and install it when it's done. It runs through the install, tells me that I should restart, but I ignore it and keep working. It's near the end of the day and I'm going to be going home soon anyways. I forgot to turn it off when I left. Came in this morning, restarted it through the Start menu, and rebooted. Upon reaching the "Ctrl+Alt+Del" ...

find formula and return value
Hi i am using the following formula to find text in a cell =IF(ISNUMBER(FIND("Super",B96)),"OK", "Not OK") and return a value. i have adapted the formula for another spreadsheet and simply added more values to check, i.e. =IF(ISNUMBER(FIND("Super""Account""Business:,B96)),"OK", "Not OK") but it doesnt seem to work. where i can see the value in the cell it is not returning ok instead of not ok. is there a limit to the number of values i can search and if so why doesnt it say as an error? what am i missing? Thanks v...

how can i copy a document to a CD without making it read only?
HOW CAN I COPY A DOCUMENT TO A CD WITHOUT MAKING IN READ ONLY? You can't. It is not the file, but the media, that is read only. Even CD-RW media does not allow editing a file on the CD. Copy te file from CD to HD, mak edits and if a CD-RW you should be able to burn the edited file back to the CD. hth "DON" wrote: > HOW CAN I COPY A DOCUMENT TO A CD WITHOUT MAKING IN READ ONLY? ...

Unable to Read Japanese Email
I correspond with several Japanese users and can read emails from some of them without a problem, but emails from others are nothing but a series of ?????. In one case, I can read one email but not another from the same sender. Changing the Encoding doesn't help. Sending emails in Japanese to them without a problem...they can read it fine. Would appreciate any suggestions/solutions as I'm stumped. I'm using Outlook 2003 on a Windows XP Home operating system. Japanese language support is installed. ...

Cannot insert duplicate key in object 'SY60100'
Using Great Plains 7.0. During Create Company process - trying to add one company, I received an error during the very last step of "Create Company Information". The error is: [Microsoft][ODBC SQL Server Driver][SQL Server]Violation of PRIMARY KEY constraint 'PKSY60100'. Cannot insert duplicate key in object 'SY60100'. make sure that the DYNAMICS database is owned by DYNSA make sure that the TWO database, if present is owned by DYNSA. THis you will have to check by using SQL enterprise manager or Query Analyzer. ------ Robert "mrosa" <mrosa@ProfitL...

Transferring read e-mail to another folder
Hello I was wondering whether there was a way in which I could automatically transfer my e-mail that has been read into another folder, such as "Old e-mail" or something like that? Thanks ...

Failed to hide column with message "cannot shift object off sheet"
Hi, I've a Excel 2000 worksheet that has 173 columns (A to FQ) with comments in a number of cells. I can't hide columns (say E:BW) with error message "cannot shift object off sheet". I searched into Microsoft Knowledgebase and found article 211769. I followed the resolution but stopped at step "3." where I can't find "Comment" of Format menu. Can anyone tell me how to resolve this problem? Thanks, Frankie What is in columns FR through IV? If nothing, columns FR:IV and Right-click on a selected columns header - select "Delete. -- HTH...

Storing values from listbox
I have a listbox (lst_Cables) which holds date and quantity of all the entries made. I also have a textbox (txt_Start) this textbox displays the date of the last entry in the lst_Cables. When the listbox is cleared the date value in txt_Start remains however when the form is closed and then re-opend the value in txt_Start is gone and an error message appears instead. I'm assuming this occurs because the listbox is empty and the default value of the textbox resets itself. What I want to do is somehow to store the date value displayed in the textbox (txt_start) so that when I re-open the fo...

Set DateField Value
Hi @ all, is there any way to set a datefield with the onload-function? "crmForm.all.activeon.value = '01.01.2000';" (in the contract form) doesn´t work. Why? Thanks for help! greetings, Stefan ------=_NextPart_0001_BF612E16 Content-Type: text/plain Content-Transfer-Encoding: 7bit <Stefan@discussions.microsoft.com> wrote: > is there any way to set a datefield with the onload-function? > "crmForm.all.activeon.value = '01.01.2000';" (in the contract form) doesn´t > work. Why? You should be using DataValue, as is done in the C...