Click here to Skip to main content
16,013,642 members
Home / Discussions / C#
   

C#

 
QuestionNested Class [modified] Pin
i gr810-Feb-10 1:31
i gr810-Feb-10 1:31 
AnswerRe: Nested Class Pin
OriginalGriff10-Feb-10 1:35
mveOriginalGriff10-Feb-10 1:35 
GeneralRe: Nested Class Pin
i gr810-Feb-10 1:53
i gr810-Feb-10 1:53 
GeneralRe: Nested Class Pin
OriginalGriff10-Feb-10 2:02
mveOriginalGriff10-Feb-10 2:02 
QuestionFile associations and ClickOnce Application Reference files Pin
Baeltazor10-Feb-10 1:13
Baeltazor10-Feb-10 1:13 
AnswerRe: File associations and ClickOnce Application Reference files Pin
Tony Richards10-Feb-10 2:16
Tony Richards10-Feb-10 2:16 
GeneralRe: File associations and ClickOnce Application Reference files Pin
Baeltazor10-Feb-10 3:28
Baeltazor10-Feb-10 3:28 
QuestionXMLNode.SelectSingleNode [modified] Pin
swjam10-Feb-10 0:56
swjam10-Feb-10 0:56 
I have the following code:

using System;
using System.IO;
using System.Xml;

public class Sample {

  public static void Main() {

    string strQuery;
    XmlDocument doc = new XmlDocument();
    doc.Load("booksort.xml");

    XmlNode book;
    XmlNode root = doc.DocumentElement;

    book=root.SelectSingleNode(strQuery);

  }
}



In the call to SelectSingleNode, how do i formulate my strQuery so that I get the FileValue2 (in this case it is 'swethrhbfb') where FileValue1="00000002.dat"

Many thanks!

<?xml version="1.0" encoding="utf-8"?>
<MyObjects xmlns="urn:deployment-manifest-schema">
    <MyObject Id="a36ef512-e9a1-48f7-9153-690f58485290" ObjectType="SPFile" ParentId="5636396a-9319-45fd-a1e0-b2eb8eb5812c" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" ParentWebUrl="esgawesodtegklas" Url="dfhgjnsdfhjdthksrtfhyasefhb">
        <File Url="efhsbertyhsehgh/ryjseryghdrfh.xml" Id="a36ef512-e9a1-48f7-9153-690f58485290" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" ParentWebUrl="tjketyaehthfyh" Name="erygawrygesrfh" >
            <Versions>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000000.dat" FileValue2="45tyw4trgh" FileValue3="eygegefgsd">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000001.dat" FileValue2="sertherfbf" FileValue3="ertegsrths">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000002.dat" FileValue2="swethrhbfb" FileValue3="tryeyerhrh">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000003.dat" FileValue2="drtyerysey" FileValue3="drjdrgndrg">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000004.dat" FileValue2="eryeryaery" FileValue3="rthrhsrths">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000005.dat" FileValue2="tyudtyufud" FileValue3="tyjnfghjdf">
				</File>
                <File Url="tukjseryhsdrtgjdtyhm" ParentWebId="db611ace-9940-4602-8f44-140fcaaa479d" Name="rfghjsetrhyusrtgbn" Id="a36ef512-e9a1-48f7-9153-690f58485290" FileValue1="00000006.dat" FileValue2="werawerase" FileValue3="gfhjndfhjd">
				</File>
			</Versions>
		</File>
	</MyObject>
</MyObjects>
----------------------------------------------------------
Lorem ipsum dolor sit amet.
modified on Wednesday, February 10, 2010 8:20 AM

Questionwhat that means Pin
3bood.ghzawi10-Feb-10 0:55
3bood.ghzawi10-Feb-10 0:55 
AnswerRe: what that means Pin
OriginalGriff10-Feb-10 1:07
mveOriginalGriff10-Feb-10 1:07 
AnswerRe: what that means Pin
V.10-Feb-10 1:14
professionalV.10-Feb-10 1:14 
Questionwhat this means Pin
3bood.ghzawi10-Feb-10 0:51
3bood.ghzawi10-Feb-10 0:51 
AnswerRe: what this means Pin
Calla10-Feb-10 1:23
Calla10-Feb-10 1:23 
Questionprocess in c# Pin
noamtzu009-Feb-10 23:19
noamtzu009-Feb-10 23:19 
AnswerRe: process in c# Pin
Rob Philpott9-Feb-10 23:30
Rob Philpott9-Feb-10 23:30 
AnswerRe: process in c# Pin
Calla9-Feb-10 23:52
Calla9-Feb-10 23:52 
AnswerRe: process in c# Pin
PIEBALDconsult10-Feb-10 3:26
mvePIEBALDconsult10-Feb-10 3:26 
QuestionSplit Data Table Records into several parts and assign to different Threads Pin
prabhakar CSPL9-Feb-10 22:47
prabhakar CSPL9-Feb-10 22:47 
QuestionThreading Pin
MumbleB9-Feb-10 22:20
MumbleB9-Feb-10 22:20 
AnswerRe: Threading Pin
OriginalGriff9-Feb-10 22:31
mveOriginalGriff9-Feb-10 22:31 
GeneralRe: Threading Pin
MumbleB9-Feb-10 22:43
MumbleB9-Feb-10 22:43 
GeneralRe: Threading Pin
OriginalGriff9-Feb-10 23:25
mveOriginalGriff9-Feb-10 23:25 
GeneralRe: Threading Pin
MumbleB9-Feb-10 23:35
MumbleB9-Feb-10 23:35 
GeneralRe: Threading Pin
Luc Pattyn10-Feb-10 1:57
sitebuilderLuc Pattyn10-Feb-10 1:57 
QuestionLoading an assembly from a new AppDoamin Pin
ThetaClear9-Feb-10 20:28
ThetaClear9-Feb-10 20:28 

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.