473,399 Members | 4,254 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,399 software developers and data experts.

Trying to get the contents of an element

Here's what I'm trying to do. Given this XML file
<?xml version="1.0" encoding="ISO-8859-1"
?><Software><Action>xxx</Action><Organization>WHS</Organization></Software>

I want to extract the contents of the <Organization> tags, that is "WHS".
Instead, all I get is "true" or "false". Here is the code:

Private Function ValidateSWFields(ByVal pSoftwareFile As String) As String

Dim strOrg As String
Dim objDoc As New XmlDocument
objDoc.LoadXml(pSoftwareFile)
Dim tag As XmlNode

'Get the values of the fields we need to verify.
tag = objDoc.SelectSingleNode("//Software/Organization[1]")
Return strOrg = tag.Value
end function

Here I am using tag.Value, but I have also tried tag.Name, tag.InnerText,
and tag.InnerXML. Why am I getting a boolean?

Much obliged.
Nov 12 '05 #1
0 789

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

Similar topics

1
by: Don Adams | last post by:
I would like to have the following XML: <phone type="work">555-123-1234</phone> <phone type="home">555-123-4321</phone> Is it possible to write a schema to restrict the contents of the type...
12
by: Adam Lipscombe | last post by:
Folks, I need to get the contents of a form attribute. In Read/Write mode this is field, so I can use getElementById("name").value In ReadOnly this is just plain text, so I can use...
6
by: Soren Kuula | last post by:
Hi, if I do: <schema xmlns="http://www.w3.org/2001/XMLSchema" xmlns:tg = "http://dongfang.dk/testdata" targetNamespace="http://dongfang.dk/testdata" elementFormDefault="qualified"> ...
2
by: Christopher Benson-Manica | last post by:
I would like to, for debugging purposes, obtain the contents of a <script> element. I'm aware that the text property contains the text contained within the element. However, the <script> element...
8
by: david.lindsay.green | last post by:
Hello all, I am quite new a web scripting and making web pages in general and I have stumbled across a problem I have as yet been unable to solve. I am trying to take the contents of a textarea box...
0
by: tbrierly | last post by:
Hello, I'm looking for help trying to get the contents of the XML document while in the ValidationEventHandler for XmlReaderSettings. Here is what I mean: We need to be able to validate the...
1
by: koch.henning | last post by:
Hello, I have some sort of problem with verifying the contents of my xml-document. I have a xml-scheme like this... <xs:complexType name="abcType"> <xs:sequence> <xs:element name="elementA"...
9
by: mevryck | last post by:
Greetings I have a huge Javascript with inclusion of external scripts and all. I got this by doing a XSLT . Now I have the contents in a Javascript variable, but I'm not able to update the...
1
by: barnacle.steve | last post by:
I'm trying to write what should be a simple script in Python, which I've never ever used before. Essentially, I have a text file that has a list of full path file names to other files, separated...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 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 a new...

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.