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

  • Thread starter Thread starter Guest
  • Start date Start date
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!
 
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)
 
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!
 
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)
 
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?
 
Back
Top