Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / January 2008

Tip: Looking for answers? Try searching our database.

bitand in XPathNavigator

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Praveen - 17 Jan 2008 21:26 GMT
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
Nicholas Paldino [.NET/C# MVP] - 18 Jan 2008 22:02 GMT
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).

Signature

         - Nicholas Paldino [.NET/C# MVP]
         - mvp@spam.guard.caspershouse.com

> using 'XPathNodeIterator' for selecting nodes.
> is it possible to do bitand operation or similar functionality in xpath
[quoted text clipped - 14 lines]
> thnks in advance,
> Praveen
Praveen - 19 Jan 2008 12:14 GMT
> 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

> "Praveen" <praveen@newsgroup.nospam> wrote in message

> news:%23TvCF$UWIHA.1532@TK2MSFTNGP04.phx.gbl...
>> using 'XPathNodeIterator' for selecting nodes.
[quoted text clipped - 15 lines]
>> thnks in advance,
>> Praveen

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.