in xpath query using prefix to locate a node

I am trying to using nodeselect to locate a node but the nodename has prefix " CS3000GR:". I recieve an error expected token eof found Name /svg[3]/g[0]/GCS3000-->:-->Modifier[0].
Call xmlDoc.Load(strPath & strFileName)
        If xmlDoc.parseError.errorCode = 0 Then
        
            xmlDoc.SetProperty "SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform'"
            xmlDoc.SetProperty "SelectionLanguage", "XPath"
           
            rstdata.Filter = "FileName =" & strFileName
            Set objNodeList = xmlDoc.documentElement.childNodes
            Do While Not rstdata.EOF
            
            If rstdata!Modify = "replace" Then
                If rstdata!Type = "element" Then
                  'Ci = VBA.CInt(VBA.Val(VBA.Right(rstdata!pointer, 1)))
                  'strXML = "[" & Ci & "]"
                  strXML = rstdata!xml_space
                    Set objNode = xmlDoc.documentElement.selectSingleNode(strXML)

Open in new window

elgadaaAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

hieloCommented:
>>has prefix "CS3000GR:".
If I understand you correctly, the "prefix" you are referring to is actually a namespace. Meaning you have nodes that look similar to (for example):
<CS3000GR:Name></CS3000GR:Name>

If so, you need to include the namespace in the "SelectionNamespaces" property:
xmlDoc.SetProperty "SelectionNamespaces", "xmlns:xsl='http://www.w3.org/1999/XSL/Transform',xmlns:CS3000GR='http://www.yoursite.com'"
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
elgadaaAuthor Commented:
thanks, yes it works
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
XML

From novice to tech pro — start learning today.