473,320 Members | 2,098 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,320 software developers and data experts.

"Well-formed XML"

Still considering myself a newbie to the world of XML, etc., 'cause my
program is still not working (not that I'll be an expert when it does,
but...). When I try to apply XPath statements to the XML string to pull
nodes, etc. out of it, I'm getting nothing back. Could my problem be that
the XML that is returned from my Web service does not have the standard "
<?xml version="1.0" ?>" (or whatever it is) header on it?

Here's my code:

------------------------------------------------------
Dim oC As New localhost.Service1
Dim oXML As New XmlDocument
Dim oNL As XmlNodeList
Dim oNd As XmlNode

Try
oXML.LoadXml(oC.GetAllContacts(txCICust.Text, txCIType.Text))
oNL = oXML.DocumentElement.SelectNodes("NewDataSet/Table/CI_NAME")
txResults.Text = "Found " & oNL.Count & " Contact records: "
For Each oNd In oNL
txResults.AppendText(vbCrLf & oNd.Value)
Next
txResults.AppendText(vbCrLf & "Done.")
Catch ex As Exception
MessageBox.Show("Error occurred: " & ex.Message)
End Try
------------------------------------------------------
The positive that I'm getting is that there is no error message--just a text
box that says: "Found 0 records. Done."

Thanx in advance for any help anyone can offer.
--
TFWBWY...A
Nov 21 '05 #1
6 1090
Bryan,

Why do you try to read a dataset as a document.

In my opinion would just a dataset do the job.

Something as
dim ds as dataset = localhost.service1 (where (web)service1 returns a
dataset)

dim myfield is ds.tables(0).rows(0).item(0) to get the first item in the
first row in the first datatable.

I hope this helps.

Cor
Nov 21 '05 #2
Because this Web service will eventually feed a 3rd-party app (or two) that
will accept XML. Also I have a pilot project to learn all this, so I'm
trying to find the easiest way to read the XML that is returned. My boss
wants the Web service to return XML.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
Bryan,

Why do you try to read a dataset as a document.

In my opinion would just a dataset do the job.

Something as
dim ds as dataset = localhost.service1 (where (web)service1 returns a
dataset)

dim myfield is ds.tables(0).rows(0).item(0) to get the first item in the
first row in the first datatable.

I hope this helps.

Cor

Nov 21 '05 #3
Bryan,

I saw the word Dataset in the XML I have the assumption therefore that the
file that is returned is a XML dataset.

XML says only that the file uses tags, which are suported by a schema.

In VBNet there are classes to handle a dataset. In DHTML I use for that the
loaddoc.

However if your boss says to use square wheels to handle a dataset, than do
it. Mostly in this kind of situations your boss will tell at the end that
you did not understand him.

However, just my thought,

Cor
Nov 21 '05 #4
Bryan,

Why do you try to read a dataset as a document.

In my opinion would just a dataset do the job.

Something as
dim ds as dataset = localhost.service1 (where (web)service1 returns a
dataset)

dim myfield is ds.tables(0).rows(0).item(0) to get the first item in the
first row in the first datatable.

I hope this helps.

Cor
Nov 21 '05 #5
Because this Web service will eventually feed a 3rd-party app (or two) that
will accept XML. Also I have a pilot project to learn all this, so I'm
trying to find the easiest way to read the XML that is returned. My boss
wants the Web service to return XML.

"Cor Ligthert" <no************@planet.nl> wrote in message
news:O1*************@TK2MSFTNGP12.phx.gbl...
Bryan,

Why do you try to read a dataset as a document.

In my opinion would just a dataset do the job.

Something as
dim ds as dataset = localhost.service1 (where (web)service1 returns a
dataset)

dim myfield is ds.tables(0).rows(0).item(0) to get the first item in the
first row in the first datatable.

I hope this helps.

Cor

Nov 21 '05 #6
Bryan,

I saw the word Dataset in the XML I have the assumption therefore that the
file that is returned is a XML dataset.

XML says only that the file uses tags, which are suported by a schema.

In VBNet there are classes to handle a dataset. In DHTML I use for that the
loaddoc.

However if your boss says to use square wheels to handle a dataset, than do
it. Mostly in this kind of situations your boss will tell at the end that
you did not understand him.

However, just my thought,

Cor
Nov 21 '05 #7

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

Similar topics

6
by: Timo Nentwig | last post by:
Hi! I need to parse large XML files which don't terminate tags without body (i.e. <TAG> when it had to be <TAG />). I'm also not sure about whether the tags are correctly case-sensitive. I do...
11
by: Joseph Turian | last post by:
Fellow hackers, I have a class BuildNode that inherits from class Node. Similarly, I have a class BuildTree that inherits from class Tree. Tree includes a member variable: vector<Node>...
3
by: NecroJoe | last post by:
I am using PHP to generate a little javascript for one of my pages. In short it allows a user to select a value from a list and pop it into a form field on a seperate page. This works well unless...
8
by: Lian | last post by:
Hi all, It is a newbie's question about html tag "img". The attributes "title" and "alt" for "img" seems having the same function. So what is the main difference between them? Can i use them at...
6
by: M Welinder | last post by:
The title more or less says it all: in C99, is the value of INT_MIN % -1 well defined (when performed as signed integers) under the assumption of two-complement representation. Note, that...
81
by: Matt | last post by:
I have 2 questions: 1. strlen returns an unsigned (size_t) quantity. Why is an unsigned value more approprate than a signed value? Why is unsighned value less appropriate? 2. Would there...
32
by: James Curran | last post by:
I'd like to make the following proposal for a new feature for the C# language. I have no connection with the C# team at Microsoft. I'm posting it here to gather input to refine it, in an "open...
43
by: markryde | last post by:
Hello, I saw in some open source projects a use of "!!" in "C" code; for example: in some header file #define event_pending(v) \ (!!(v)->vcpu_info->evtchn_upcall_pending & \...
37
by: jht5945 | last post by:
For example I wrote a function: function Func() { // do something } we can call it like: var obj = new Func(); // call it as a constructor or var result = Func(); // call it as...
10
by: Prisoner at War | last post by:
Hi, your friendly neighborhood n00b here, just wondering why on earth the Py3K folks want to mess with a simple thing like the "print" "command" (is that what it's called, a command?), turning it...
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: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
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...
1
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...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.