selectSingleNode( "a path where names include parentheses") proble

G

Guest

I'm trying to execute selectsinglenode(string_var) where where string_var
contains the value ".//NetIncome(YTD)_Member/Series[@type='data']". The
opening and closing parentheses are literals (not defining a function or
serving a grouping purpose). I get an error:

msxml3.dll: Unknown method.
.//-->NetIncome(YTD<--)_Member/Series[@type='data']

How do I get selectsinglenode to treat the parentheses as literals? I've
tried a variety of escape sequences to no avail.

Many thanks!
 
B

bruce barker

as xml does not support ()'s and several other characters in a node
name, there is no quoting for it. there are also additional restrictions
on the first char of a node name.

-- bruce (sqlwork.com)
 
G

Guest

Thanks for the quick reply, Bruce!

Do you know where I can find a complete list of charcters that cannot be in
a node name?
--
Bob Hodgman


bruce barker said:
as xml does not support ()'s and several other characters in a node
name, there is no quoting for it. there are also additional restrictions
on the first char of a node name.

-- bruce (sqlwork.com)
I'm trying to execute selectsinglenode(string_var) where where string_var
contains the value ".//NetIncome(YTD)_Member/Series[@type='data']". The
opening and closing parentheses are literals (not defining a function or
serving a grouping purpose). I get an error:

msxml3.dll: Unknown method.
.//-->NetIncome(YTD<--)_Member/Series[@type='data']

How do I get selectsinglenode to treat the parentheses as literals? I've
tried a variety of escape sequences to no avail.

Many thanks!
 
B

bruce barker

from: http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Nmtoken

[Definition: A Name is a token beginning with a letter or one of a few
punctuation characters, and continuing with letters, digits, hyphens,
underscores, colons, or full stops, together known as name characters.]
Names beginning with the string "xml", or with any string which would
match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization
in this or future versions of this specification.


note: a ":" is allowed, but its a separator between the namespace and
the node name.

-- bruce (sqlwork.com)
 
G

Guest

Great! Thanks, Bruce!
--
Bob Hodgman


bruce barker said:
from: http://www.w3.org/TR/2006/REC-xml-20060816/#NT-Nmtoken

[Definition: A Name is a token beginning with a letter or one of a few
punctuation characters, and continuing with letters, digits, hyphens,
underscores, colons, or full stops, together known as name characters.]
Names beginning with the string "xml", or with any string which would
match (('X'|'x') ('M'|'m') ('L'|'l')), are reserved for standardization
in this or future versions of this specification.


note: a ":" is allowed, but its a separator between the namespace and
the node name.

-- bruce (sqlwork.com)

Thanks for the quick reply, Bruce!

Do you know where I can find a complete list of charcters that cannot be in
a node name?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,744
Messages
2,569,483
Members
44,901
Latest member
Noble71S45

Latest Threads

Top