Click here to Skip to main content
15,884,388 members
Home / Discussions / C#
   

C#

 
GeneralRe: excel listview c# Pin
Kalay1621-Oct-14 8:13
Kalay1621-Oct-14 8:13 
GeneralRe: excel listview c# Pin
Eddy Vluggen22-Oct-14 5:24
professionalEddy Vluggen22-Oct-14 5:24 
GeneralRe: excel listview c# Pin
Kalay1622-Oct-14 18:20
Kalay1622-Oct-14 18:20 
GeneralRe: excel listview c# Pin
Kalay1622-Oct-14 18:20
Kalay1622-Oct-14 18:20 
GeneralRe: excel listview c# Pin
Eddy Vluggen24-Oct-14 1:39
professionalEddy Vluggen24-Oct-14 1:39 
GeneralRe: excel listview c# Pin
Kalay1624-Oct-14 10:23
Kalay1624-Oct-14 10:23 
GeneralRe: excel listview c# Pin
Eddy Vluggen27-Oct-14 9:01
professionalEddy Vluggen27-Oct-14 9:01 
QuestionXML Serialization, Xpath and SelectNodes Pin
Member 1093483614-Oct-14 22:11
Member 1093483614-Oct-14 22:11 
Hello,

I face some challenges and would appreciate help in finding out how to handle it.

I am using XML serialization to save some data of an application. However, I would like to use the same XML file in a different application. I do not want to de-serialize the file; I just read it with XmlDoc.

The reading part of it works fine, however, in my other application I would like to execute same SelectNodes+Xpath queries - that's the problem. Any query, I do, doesnt work for some reason.

Here an example of my XML file:

XML
<?xml version="1.0" encoding="utf-8"?>
<TestProject xmlns:i="http://www.w3.org/2001/XMLSchema-instance" z:Id="i1" xmlns:z="http://schemas.microsoft.com/2003/10/Serialization/" xmlns="http://schemas.datacontract.org/2004/07/Test">
  <DicKeysWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <IsCurrentlyLoading>false</IsCurrentlyLoading>
  <IsLoaded>false</IsLoaded>
  <IsProcessing>false</IsProcessing>
  <ListsWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <ObjectsWhichDirectlyReferenceMe xmlns:d2p1="http://schemas.microsoft.com/2003/10/Serialization/Arrays" i:nil="true" />
  <name>UnknownTypeName</name>
  ...


A query like this just works, but doesnt bring a big benefit for course...!
XmlDocument doc = new XmlDocument();
doc.Load("test.xml");
XmlNode node = doc.ChildNodes[1];
XmlNodeList list = doc.SelectNodes("*");


However, a query like this doesnt work:
XmlNodeList list = doc.SelectNodes("IsLoaded");
XmlNodeList list1 = doc.SelectNodes("/IsLoaded");
XmlNodeList list2 = doc.SelectNodes("//IsLoaded");


I was already trying many things, inc. adding some namespaces, but I wasnt successful.

Again, I would be thankful for any help!

thanks and best regards
AnswerRe: XML Serialization, Xpath and SelectNodes Pin
Gerry Schmitz15-Oct-14 10:43
mveGerry Schmitz15-Oct-14 10:43 
QuestionC # application launch problem by connecting with a database Informix ODBC. Pin
Ibrahim.elh14-Oct-14 20:47
Ibrahim.elh14-Oct-14 20:47 
AnswerRe: C # application launch problem by connecting with a database Informix ODBC. Pin
Manfred Rudolf Bihy15-Oct-14 0:34
professionalManfred Rudolf Bihy15-Oct-14 0:34 
QuestionC# Pin
Member 1114850614-Oct-14 19:04
Member 1114850614-Oct-14 19:04 
AnswerRe: C# Pin
OriginalGriff14-Oct-14 20:10
mveOriginalGriff14-Oct-14 20:10 
GeneralRe: C# Pin
BillWoodruff14-Oct-14 22:02
professionalBillWoodruff14-Oct-14 22:02 
GeneralRe: C# Pin
OriginalGriff14-Oct-14 22:10
mveOriginalGriff14-Oct-14 22:10 
GeneralMy Vote of one Pin
Wayne Gaylard14-Oct-14 22:28
professionalWayne Gaylard14-Oct-14 22:28 
AnswerRe: C# PinPopular
BillWoodruff14-Oct-14 20:40
professionalBillWoodruff14-Oct-14 20:40 
QuestionI want a project in c#.net Pin
Irfan Ullah14-Oct-14 8:56
Irfan Ullah14-Oct-14 8:56 
AnswerRe: I want a project in c#.net Pin
BillWoodruff14-Oct-14 9:04
professionalBillWoodruff14-Oct-14 9:04 
QuestionRe: I want a project in c#.net Pin
ZurdoDev14-Oct-14 9:19
professionalZurdoDev14-Oct-14 9:19 
AnswerRe: I want a project in c#.net Pin
OriginalGriff14-Oct-14 20:07
mveOriginalGriff14-Oct-14 20:07 
QuestionChange the datetime variable output to a specific format Pin
nitin_ion14-Oct-14 7:40
nitin_ion14-Oct-14 7:40 
QuestionRe: Change the datetime variable output to a specific format Pin
Kornfeld Eliyahu Peter14-Oct-14 7:44
professionalKornfeld Eliyahu Peter14-Oct-14 7:44 
AnswerRe: Change the datetime variable output to a specific format Pin
nitin_ion14-Oct-14 8:03
nitin_ion14-Oct-14 8:03 
AnswerRe: Change the datetime variable output to a specific format Pin
Kornfeld Eliyahu Peter14-Oct-14 8:06
professionalKornfeld Eliyahu Peter14-Oct-14 8:06 

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.