Click here to Skip to main content
12,695,365 members (29,482 online)
   

C#

 
GeneralRe: Mathematical Question Pin
Abrek Okur5-Nov-12 23:15
memberAbrek Okur5-Nov-12 23:15 
GeneralRe: Mathematical Question Pin
Pete O'Hanlon5-Nov-12 23:17
protectorPete O'Hanlon5-Nov-12 23:17 
GeneralRe: Mathematical Question Pin
n.podbielski5-Nov-12 23:43
membern.podbielski5-Nov-12 23:43 
AnswerRe: Mathematical Question Pin
ihoecken6-Nov-12 5:56
memberihoecken6-Nov-12 5:56 
QuestionAssigning Variables in C# for ORACLE Pin
KingJames065-Nov-12 20:52
memberKingJames065-Nov-12 20:52 
AnswerRe: Assigning Variables in C# for ORACLE Pin
Abhinav S5-Nov-12 22:16
mvpAbhinav S5-Nov-12 22:16 
GeneralRe: Assigning Variables in C# for ORACLE Pin
KingJames065-Nov-12 23:13
memberKingJames065-Nov-12 23:13 
GeneralRe: Assigning Variables in C# for ORACLE Pin
Eddy Vluggen6-Nov-12 0:45
memberEddy Vluggen6-Nov-12 0:45 
GeneralRe: Assigning Variables in C# for ORACLE Pin
KingJames066-Nov-12 15:38
memberKingJames066-Nov-12 15:38 
GeneralRe: Assigning Variables in C# for ORACLE Pin
Eddy Vluggen6-Nov-12 23:45
memberEddy Vluggen6-Nov-12 23:45 
QuestionC#, Win'7, Port Mystery Pin
C-P-User-35-Nov-12 13:49
memberC-P-User-35-Nov-12 13:49 
AnswerRe: C#, Win'7, Port Mystery Pin
Pete O'Hanlon5-Nov-12 23:18
protectorPete O'Hanlon5-Nov-12 23:18 
GeneralRe: C#, Win'7, Port Mystery Pin
C-P-User-36-Nov-12 7:03
memberC-P-User-36-Nov-12 7:03 
QuestionReading XML Pin
Kevin Marois5-Nov-12 8:34
memberKevin Marois5-Nov-12 8:34 
I must be slipping. This used to work...

The XML file:
<?xml version="1.0" encoding="utf-8"?>
<Properties>
  <PropertyEditor>
    <Property ViewName = "Characteristics" PropertyName = "ValueLand" DisplayName = "Land Value" DataType = "numeric"/>
    <Property ViewName = "Characteristics" PropertyName = "ValueStructure" DisplayName = "Structure Value" DataType = "numeric"/>
    <Property ViewName = "Characteristics" PropertyName = "ValuePersonal" DisplayName = "Personal Value" DataType = "numeric"/>
  </PropertyEditor>
</Properties>


and the code to read it

private void GetPropertyData()
{
    propertyDatas = new List<PropertyData>();

    string path = Path.GetDirectoryName(Application.ExecutablePath) + @"\EditorProperties.xml";

    XmlTextReader reader = new XmlTextReader(path);

    XmlDocument doc = new XmlDocument();
    XmlNode node = doc.ReadNode(reader);

    foreach (XmlNode childNode in node.ChildNodes)
    {
        foreach (XmlAttribute att in childNode.Attributes)
        {
            PropertyData propertyData = new PropertyData
            {
                ViewName = att.Attributes["Characteristics"].Value,
                PropertyName = att.Attributes["PropertyName"].Value,
                DisplayName = att.Attributes["DisplayName"].Value,
                DataType = att.Attributes["numeric"].Value
            };

            propertyDatas.Add(propertyData);
        }
    }
}


Now, for some reason, it reads the 'XML' line, then the code skips out on the first foreach.

What's wrong here?

Thanks
If it's not broken, fix it until it is

AnswerRe: Reading XML Pin
Eddy Vluggen5-Nov-12 9:25
memberEddy Vluggen5-Nov-12 9:25 
GeneralRe: Reading XML Pin
Kevin Marois5-Nov-12 11:09
memberKevin Marois5-Nov-12 11:09 
GeneralRe: Reading XML Pin
Eddy Vluggen5-Nov-12 11:20
memberEddy Vluggen5-Nov-12 11:20 
AnswerRe: Reading XML Pin
Clifford Nelson5-Nov-12 13:23
memberClifford Nelson5-Nov-12 13:23 
QuestionGenerics? Pin
David Knechtges5-Nov-12 6:50
memberDavid Knechtges5-Nov-12 6:50 
AnswerRe: Generics? Pin
Alan Balkany5-Nov-12 6:53
memberAlan Balkany5-Nov-12 6:53 
AnswerRe: Generics? Pin
harold aptroot5-Nov-12 6:59
memberharold aptroot5-Nov-12 6:59 
AnswerRe: Generics? Pin
Matt T Heffron5-Nov-12 12:29
memberMatt T Heffron5-Nov-12 12:29 
QuestionMy DataGridView - FirstDisplayedScrollingRowIndex Pin
Paramu19735-Nov-12 6:06
memberParamu19735-Nov-12 6:06 
QuestionGetter Pin
C-P-User-35-Nov-12 3:49
memberC-P-User-35-Nov-12 3:49 
AnswerRe: Getter Pin
J4amieC5-Nov-12 4:01
memberJ4amieC5-Nov-12 4:01 
GeneralRe: Getter Pin
C-P-User-35-Nov-12 5:30
memberC-P-User-35-Nov-12 5:30 
GeneralRe: Getter Pin
Dave Kreskowiak5-Nov-12 5:43
mvpDave Kreskowiak5-Nov-12 5:43 
GeneralRe: Getter Pin
J4amieC5-Nov-12 5:44
memberJ4amieC5-Nov-12 5:44 
GeneralRe: Getter Pin
Pete O'Hanlon5-Nov-12 5:47
protectorPete O'Hanlon5-Nov-12 5:47 
AnswerRe: Getter Pin
Abhinav S5-Nov-12 6:37
mvpAbhinav S5-Nov-12 6:37 
GeneralRe: Getter Pin
C-P-User-35-Nov-12 8:18
memberC-P-User-35-Nov-12 8:18 
GeneralRe: Getter Pin
Pete O'Hanlon5-Nov-12 9:01
protectorPete O'Hanlon5-Nov-12 9:01 
AnswerRe: Getter Pin
DaveyM695-Nov-12 9:06
mentorDaveyM695-Nov-12 9:06 
GeneralRe: Getter Pin
C-P-User-35-Nov-12 9:29
memberC-P-User-35-Nov-12 9:29 
GeneralRe: Getter Pin
DaveyM695-Nov-12 9:41
mentorDaveyM695-Nov-12 9:41 
GeneralRe: Getter Pin
Pete O'Hanlon5-Nov-12 9:45
protectorPete O'Hanlon5-Nov-12 9:45 
QuestionFORMAT ASSEMBLY Pin
Member 91410335-Nov-12 3:01
memberMember 91410335-Nov-12 3:01 
AnswerRe: FORMAT ASSEMBLY Pin
Eddy Vluggen5-Nov-12 3:13
memberEddy Vluggen5-Nov-12 3:13 
GeneralRe: FORMAT ASSEMBLY Pin
Member 91410335-Nov-12 3:23
memberMember 91410335-Nov-12 3:23 
GeneralRe: FORMAT ASSEMBLY Pin
Eddy Vluggen5-Nov-12 3:27
memberEddy Vluggen5-Nov-12 3:27 
GeneralRe: FORMAT ASSEMBLY Pin
Member 91410335-Nov-12 3:29
memberMember 91410335-Nov-12 3:29 
QuestionRe: FORMAT ASSEMBLY Pin
Eddy Vluggen5-Nov-12 3:42
memberEddy Vluggen5-Nov-12 3:42 
AnswerRe: FORMAT ASSEMBLY Pin
Member 91410335-Nov-12 4:15
memberMember 91410335-Nov-12 4:15 
GeneralRe: FORMAT ASSEMBLY Pin
Dave Kreskowiak5-Nov-12 4:21
mvpDave Kreskowiak5-Nov-12 4:21 
GeneralRe: FORMAT ASSEMBLY Pin
Member 91410335-Nov-12 4:35
memberMember 91410335-Nov-12 4:35 
GeneralRe: FORMAT ASSEMBLY Pin
Dave Kreskowiak5-Nov-12 5:48
mvpDave Kreskowiak5-Nov-12 5:48 
AnswerRe: FORMAT ASSEMBLY Pin
Eddy Vluggen5-Nov-12 5:39
memberEddy Vluggen5-Nov-12 5:39 
QuestionCreate a button in the context menu for each selected contact. Pin
csharpcomeintome5-Nov-12 1:22
membercsharpcomeintome5-Nov-12 1:22 
AnswerRe: Create a button in the context menu for each selected contact. Pin
Mycroft Holmes5-Nov-12 1:39
memberMycroft Holmes5-Nov-12 1:39 
GeneralRe: Create a button in the context menu for each selected contact. Pin
csharpcomeintome5-Nov-12 3:36
membercsharpcomeintome5-Nov-12 3:36 

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.


Advertise | Privacy | Mobile
Web02 | 2.8.170118.1 | Last Updated 19 Jan 2017
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid