Click here to Skip to main content
15,907,326 members
Home / Discussions / C#
   

C#

 
GeneralRe: Newbie: How to find out which menu item has been clicked from a context menu? Pin
Phillip Hodges14-Aug-06 1:15
Phillip Hodges14-Aug-06 1:15 
GeneralRe: Newbie: How to find out which menu item has been clicked from a context menu? Pin
Ed.Poore14-Aug-06 1:21
Ed.Poore14-Aug-06 1:21 
QuestionSimple question Pin
JacquesDP14-Aug-06 0:33
JacquesDP14-Aug-06 0:33 
AnswerRe: Simple question Pin
Ed.Poore14-Aug-06 1:12
Ed.Poore14-Aug-06 1:12 
GeneralRe: Simple question Pin
JacquesDP14-Aug-06 1:28
JacquesDP14-Aug-06 1:28 
GeneralRe: Simple question Pin
Ed.Poore14-Aug-06 2:12
Ed.Poore14-Aug-06 2:12 
GeneralRe: Simple question Pin
JacquesDP14-Aug-06 18:30
JacquesDP14-Aug-06 18:30 
Questionxquery problem [modified] Pin
kkadir14-Aug-06 0:20
kkadir14-Aug-06 0:20 
Hi,

I want to make a search with xQuery but while I am a beginner I got an "invalid token" with my query and cannot figure it out why it occurs.

Here is my xml part :
<archive><br />
  <image name="" path=""><br />
    <olay><br />
    </olay><br />
    <yer><br />
    </yer><br />
    <zaman><br />
      <gecegunduz><br />
      </gecegunduz><br />
      <saat><br />
      </saat><br />
      <gun><br />
      </gun><br />
      <ay><br />
      </ay><br />
      <yil><br />
      </yil><br />
    </zaman><br />
    <anahtar><br />
      <item><br />
      </item><br />
    </anahtar><br />
</image><br />
</archive>


and this is my query :

query = "for $x in /archive/image return if ((contains($x/@name," + c + ") or (contains($x/@path," + c + ") or (contains($x/olay," + c + ") or (contains($x/yer," + c + ") or (contains($x/zaman/saat," + c + ") or (contains($x/zaman/gun," + c + ") or (contains($x/zaman/ay," + c + ") or (contains($x/zaman/yil," + c + ") or (contains($x/anahtar/item," + c + ")) then return $x";

I simply follow the pattern of msdn :
XPathDocument xPathDoc = new XPathDocument(@"C:\test.xml");<br />
                XPathNavigator xPathNav = xPathDoc.CreateNavigator();<br />
                XPathExpression xPathExpr = xPathNav.Compile(query);<br />
                XPathNodeIterator xPathIter = xPathNav.Select(xPathExpr);


so what is wrong with this ? Please help..D'Oh! | :doh:

p.s. : the exact thing I try to do is making a complete search inside my xml document. when the user writes something in the textbox and click search, using this query, I try to get every node containing the keyword anywhere inside..

best regards..!


-- modified at 6:34 Monday 14th August, 2006

.:: Something is Wrong ::.

Questionbuilt own modal dialogs Pin
snapper_21214-Aug-06 0:07
snapper_21214-Aug-06 0:07 
QuestionWindows Service stops after logging-off from current user/login. Pin
imdeepakpathak13-Aug-06 23:50
imdeepakpathak13-Aug-06 23:50 
AnswerRe: Windows Service stops after logging-off from current user/login. Pin
seee sharp14-Aug-06 0:19
seee sharp14-Aug-06 0:19 
QuestionMouse Clicking Pin
Cassiopeiaxy13-Aug-06 22:10
Cassiopeiaxy13-Aug-06 22:10 
AnswerRe: Mouse Clicking Pin
Malcolm Smart13-Aug-06 22:38
Malcolm Smart13-Aug-06 22:38 
QuestionHow to send a file in batch mode ? Pin
sundar15613-Aug-06 21:20
sundar15613-Aug-06 21:20 
AnswerRe: How to send a file in batch mode ? Pin
Malcolm Smart13-Aug-06 22:11
Malcolm Smart13-Aug-06 22:11 
GeneralRe: How to send a file in batch mode ? Pin
sundar15614-Aug-06 0:16
sundar15614-Aug-06 0:16 
QuestionAbout SplitContainer Pin
ytubis13-Aug-06 21:13
ytubis13-Aug-06 21:13 
AnswerRe: About SplitContainer Pin
CooperWu13-Aug-06 21:33
CooperWu13-Aug-06 21:33 
GeneralRe: About SplitContainer Pin
ytubis13-Aug-06 21:37
ytubis13-Aug-06 21:37 
GeneralRe: About SplitContainer Pin
CooperWu13-Aug-06 21:42
CooperWu13-Aug-06 21:42 
QuestionAbout Threading Pin
engsrini13-Aug-06 20:23
engsrini13-Aug-06 20:23 
AnswerRe: About Threading Pin
Guffa13-Aug-06 21:06
Guffa13-Aug-06 21:06 
GeneralRe: About Threading Pin
engsrini13-Aug-06 21:18
engsrini13-Aug-06 21:18 
GeneralRe: About Threading Pin
Dario Solera13-Aug-06 22:27
Dario Solera13-Aug-06 22:27 
AnswerRe: About Threading Pin
CooperWu13-Aug-06 21:41
CooperWu13-Aug-06 21:41 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.