Altova Mailing List Archives
>microsoft.public.xml Archive Home
>Thread Prev - why selectNodes returns nothing?
Re: why selectNodes returns nothing?
Date: 6/15/2008 3:50:00 PM
As for the second one, I believe it's because test is not in single quotes as in: xmlmodel.selectSingleNode("//UserMacro[@Name='test']"); For the first one, have you tried: xmlmodel.getElementsByTagName("//UserMacro"); -Scott "thinktwice" <memorialday@g...> wrote in message news:378c3cab-b763-446c-bca0-01ac89a97e40@u...... > my xml file is like this: > > <?xml version="1.0" encoding="gb2312"?> > <VisualStudioPropertySheet ProjectType="Visual C++" ...> > <UserMacro Name="test" Value="test"/> > </VisualStudioPropertySheet> > > > xmlmodel.selectNodes("//UserMacro"); > xmlmodel.selectSingleNode("//UserMacro[@Name=test]"); > > both return nothing, why?