Click here to Skip to main content
15,922,533 members
Home / Discussions / C#
   

C#

 
GeneralRe: Mouse Events Pin
rich_wenger11-Nov-05 5:53
rich_wenger11-Nov-05 5:53 
QuestionFrom designer, create a component passing parameters Pin
monteiz10-Nov-05 3:36
monteiz10-Nov-05 3:36 
AnswerRe: From designer, create a component passing parameters Pin
monteiz10-Nov-05 4:01
monteiz10-Nov-05 4:01 
QuestionTextbox Pin
PaulaM10-Nov-05 2:50
PaulaM10-Nov-05 2:50 
AnswerRe: Textbox Pin
S. Senthil Kumar10-Nov-05 3:48
S. Senthil Kumar10-Nov-05 3:48 
AnswerRe: Textbox Pin
Gulfraz Khan10-Nov-05 6:17
Gulfraz Khan10-Nov-05 6:17 
AnswerRe: Textbox Pin
Craig G Fraser10-Nov-05 22:23
Craig G Fraser10-Nov-05 22:23 
Questionc# and xml Pin
ginopilotino8210-Nov-05 2:11
ginopilotino8210-Nov-05 2:11 
i say you sorry for my bad english.
i've a problem with this code:

XmlTextReader reader = new XmlTextReader(@"c:\book.xml");<br />
					XmlDocument doc = new XmlDocument();<br />
					doc.Load(reader);<br />
<br />
					XmlNodeList nodeList;<br />
					XmlElement root = doc.DocumentElement;<br />
<br />
					nodeList = root.SelectNodes("/bookstore/book/price[text()='11.99']");<br />
<br />
					XmlElement newCd;<br />
					XmlNode padre;<br />
<br />
					foreach (XmlNode oldCd in nodeList) <br />
					{<br />
						newCd = doc.CreateElement("author");<br />
<br />
						newCd.SetAttribute("visible", "true");<br />
		<br />
						newCd.InnerXml = oldCd.InnerXml;<br />
		<br />
						padre = oldCd.ParentNode;<br />
						padre.ReplaceChild(newCd, oldCd);<br />
					<br />
<br />
					}<br />
					doc.Save(@"c:\prova2.xml");


i have an XML with this structure:


<br />
bookstore<br />
    book<br />
        price 11.99 /price<br />
        author .. author<br />
        title .. /title<br />
         ..<br />
         ..<br />
    /book<br />
/bookstore<br />



if in the code I write

nodeList = root.SelectNodes("/bookstore/book/price[text()>'11.00']");

the nodeList has 1 node because the expression is ok but i don't understand the reason that I write

nodeList = root.SelectNodes("/bookstore/book/price[text()='11.99']");

the nodeList.Count() results 0 and the program returns that there are no nodes matching the expression. the same thing happens if i try to test the content of title, author etc.

Can you help me? Sigh | :sigh:
AnswerRe: c# and xml Pin
S. Senthil Kumar10-Nov-05 4:08
S. Senthil Kumar10-Nov-05 4:08 
GeneralRe: c# and xml Pin
ginopilotino8210-Nov-05 4:49
ginopilotino8210-Nov-05 4:49 
GeneralRe: c# and xml Pin
S. Senthil Kumar10-Nov-05 5:25
S. Senthil Kumar10-Nov-05 5:25 
GeneralRe: c# and xml Pin
ginopilotino8210-Nov-05 5:48
ginopilotino8210-Nov-05 5:48 
QuestionShow more than one row on the datagrid's Footer Pin
Fendefa10-Nov-05 1:51
Fendefa10-Nov-05 1:51 
QuestionLocating App path Pin
Mark0610-Nov-05 1:50
Mark0610-Nov-05 1:50 
AnswerRe: Locating App path Pin
S. Senthil Kumar10-Nov-05 3:44
S. Senthil Kumar10-Nov-05 3:44 
AnswerRe: Locating App path Pin
AETaylor10-Nov-05 22:09
AETaylor10-Nov-05 22:09 
QuestionHow To Rotate a 2d rectangle dynamically with Mouse movements in C sharp Pin
ArunNeyaaSoft10-Nov-05 1:43
ArunNeyaaSoft10-Nov-05 1:43 
QuestionHow To Rotate a 2d rectangle dynamically Pin
ArunNeyaaSoft10-Nov-05 1:43
ArunNeyaaSoft10-Nov-05 1:43 
QuestionRectangle and Measurement Studio Pin
M.Friedel10-Nov-05 1:41
M.Friedel10-Nov-05 1:41 
QuestionIs it in as for Internet Files, Cookie, and History? Pin
yamadakun10-Nov-05 1:09
yamadakun10-Nov-05 1:09 
Questionproblem with moving to vs 2005 Pin
Gil.Schmidt10-Nov-05 0:33
Gil.Schmidt10-Nov-05 0:33 
QuestionMultiple Connections Pin
Rashid.Mahmood9-Nov-05 23:48
Rashid.Mahmood9-Nov-05 23:48 
AnswerRe: Multiple Connections Pin
Gulfraz Khan10-Nov-05 6:22
Gulfraz Khan10-Nov-05 6:22 
GeneralRe: Multiple Connections Pin
Rashid.Mahmood11-Nov-05 2:34
Rashid.Mahmood11-Nov-05 2:34 
QuestionAbout pdb file in C# Pin
webC#9-Nov-05 22:49
webC#9-Nov-05 22:49 

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.