bitand in XPathNavigator

  • Thread starter Thread starter Praveen
  • Start date Start date
P

Praveen

using 'XPathNodeIterator' for selecting nodes.
is it possible to do bitand operation or similar functionality in xpath


XmlDocument XmlDoc = new XmlDocument();
XmlDoc.LoadXml(xmlstring);

string strXpth="//ROOT/C[@A=0]"//this works

can I do bitad operation or similar here .. something like
string strXpth="//ROOT/C[@A=0 and BITAND(@B,14)>0]"


XPathNavigator XpNav = XmlData.CreateNavigator();
XPathExpression xPathExp = XpNav .Compile(strXpth)// can this strXpth can
have bitand operation
XPathNodeIterator XpNdI = XpNav.Select(xPathExp);


thnks in advance,
Praveen
 
Praveen,

Unfortunately, they do not. You will have to process this outside of
XPath (or, you can translate the bit sequence into another XML instance
which has them exposed as boolean values, which you can then craft an
appropriate XPath expression for).
 
Nicholas Paldino said:
Praveen,

Unfortunately, they do not. You will have to process this outside of
XPath (or, you can translate the bit sequence into another XML instance
which has them exposed as boolean values, which you can then craft an
appropriate XPath expression for).





thanks Nicholas,
I figured out a way to accomplish this by using
Ref: http://support.microsoft.com/kb/324462
http://msdn.microsoft.com/msdnmag/issues/03/02/XMLFiles/



praveen
using 'XPathNodeIterator' for selecting nodes.
is it possible to do bitand operation or similar functionality in xpath


XmlDocument XmlDoc = new XmlDocument();
XmlDoc.LoadXml(xmlstring);

string strXpth="//ROOT/C[@A=0]"//this works

can I do bitad operation or similar here .. something like
string strXpth="//ROOT/C[@A=0 and BITAND(@B,14)>0]"


XPathNavigator XpNav = XmlData.CreateNavigator();
XPathExpression xPathExp = XpNav .Compile(strXpth)// can this strXpth can
have bitand operation
XPathNodeIterator XpNdI = XpNav.Select(xPathExp);


thnks in advance,
Praveen
 

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

Back
Top