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

How to access element names with dots and spaces?

This line works fine for me:
Set objDOMnode = objDom.selectSingleNode("//headline")
strHeadline = objDOMnode.Text

Now I want to get the value from this node:

<nitf>
- <head>
- <docdata>
- <date.issue norm="20020308T153751+0100" />

Why does these line not give the correct results?
Set objDOMnode = objDom.selectSingleNode("//date.issue norm")
strDate= objDOMnode.Text
Jul 20 '05 #1
4 1451
Ragnar Heil wrote:
Now I want to get the value from this node:

<nitf>
- <head>
- <docdata>
- <date.issue norm="20020308T153751+0100" />

Why does these line not give the correct results?
Set objDOMnode = objDom.selectSingleNode("//date.issue norm")
strDate= objDOMnode.Text


1. get the element node for "date.issue"
2. get the attribute value for "norm"
--
Johannes Koch
In te domine speravi; non confundar in aeternum.
(Te Deum, 4th cent.)
Jul 20 '05 #2
In article <8a*************************@posting.google.com> ,
Ragnar Heil <r@gnar.de> wrote:
- <date.issue norm="20020308T153751+0100" />

Why does these line not give the correct results?
Set objDOMnode = objDom.selectSingleNode("//date.issue norm")


You saeem to be treating this as if it were an element called
"date.issue norm". It isn't, it's an element called "date.issue"
with an attribute called "norm".

Element names can't have spaces in.

-- Richard

Jul 20 '05 #3
Thank you both for your replies!

I tried two ways to get the value

1) Set objDateNode = objDom.selectSingleNode("//date.issue")
Set DateNodeAttr = objDateNode.Attributes
norm = DateNodeAttr.getNamedItem("norm")
strDate = norm.xml

2) DateNodeAttrLength = DateNodeAttr.length
For i = 1 To DateNodeAttrLength
strDate = DateNodeAttr(i).Value
Next

what is the prefered way?
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #4
Thank you both for your replies!

Now I tried two ways to get the value of the attribute:

1) Set objDateNode = objDom.selectSingleNode("//date.issue")
Set DateNodeAttr = objDateNode.Attributes
norm = DateNodeAttr.getNamedItem("norm")
strDate = norm.xml

2) DateNodeAttrLength = DateNodeAttr.length
For i = 1 To DateNodeAttrLength
strDate = DateNodeAttr(i).Value
Next

Both ways dont work :-(
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Jul 20 '05 #5

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

Similar topics

14
by: Jeff | last post by:
Ok. I am creating a table in an access DB based on a form submission. This works fine. The problem I am having is, if there is a space in the submission. For example.... someone submits "The...
7
by: PeteC | last post by:
I'm working on a web page which has some form elements in it which I need to manipulate using JavaScript. If the element is (for example, in a form called TicketForm) <INPUT...
2
by: Dutchy | last post by:
Hi there, After spending several hours trying all I could imagine and search for in Google I gave up. In a continuous form I want to sort the choosen column by clicking the header (label) of...
6
by: fumanchu | last post by:
I've got to let end users (really just one person) load billing batch files into a third party app table. They need to specify the billing cycle name, the batch name, and the input file name and...
14
by: Sergei Riaguzov | last post by:
I have a very strange behaviour with POST keys. Consider a test: wtf.html: === Cut === <form action="eh.php" method="POST">     <input type="checkbox" name="many spaces and. . dots. . "/>...
2
by: Michael Bialowas | last post by:
Hello all, I have been searching the net endlessly and found this ng, so I thought I would give a try. Anyways, I have a few problems I am trying to implement a combo box which presently contains...
5
by: effendi | last post by:
I am trying to write a simple routine multiplying one value of a field to another. i.e cost1 multiple by cost2.. But since I have many lines of these, I want to write a function by accessing the...
6
by: adurth | last post by:
Hi! Is there any function that converts a string containing characters that are invalid for use in an element name to a valid one? Thanks, Andreas
5
by: Ana C. Dent | last post by:
PF wrote: A couple of months ago I found a Note: on MetaLink which detailed how to use OID to serve DB names. I was going from TNSNAMES.ORA files to OID, but it did work. However I never...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.