Click here to Skip to main content
       

C#

 
GeneralRe: Assigning Variables in C# for ORACLE PinmemberKingJames065-Nov-12 22:13 
GeneralRe: Assigning Variables in C# for ORACLE PinmemberEddy Vluggen5-Nov-12 23:45 
GeneralRe: Assigning Variables in C# for ORACLE PinmemberKingJames066-Nov-12 14:38 
GeneralRe: Assigning Variables in C# for ORACLE PinmemberEddy Vluggen6-Nov-12 22:45 
QuestionC#, Win'7, Port Mystery PinmemberC-P-User-35-Nov-12 12:49 
AnswerRe: C#, Win'7, Port Mystery PinprotectorPete O'Hanlon5-Nov-12 22:18 
GeneralRe: C#, Win'7, Port Mystery PinmemberC-P-User-36-Nov-12 6:03 
QuestionReading XML PinmemberKevin Marois5-Nov-12 7: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 PinmemberEddy Vluggen5-Nov-12 8:25 
GeneralRe: Reading XML PinmemberKevin Marois5-Nov-12 10:09 
GeneralRe: Reading XML [modified] PinmemberEddy Vluggen5-Nov-12 10:20 
AnswerRe: Reading XML PinmemberClifford Nelson5-Nov-12 12:23 
QuestionGenerics? PinmemberDavid Knechtges5-Nov-12 5:50 
AnswerRe: Generics? PinmemberAlan Balkany5-Nov-12 5:53 
AnswerRe: Generics? Pinmemberharold aptroot5-Nov-12 5:59 
AnswerRe: Generics? PinmemberMatt T Heffron5-Nov-12 11:29 
QuestionMy DataGridView - FirstDisplayedScrollingRowIndex PinmemberParamu19735-Nov-12 5:06 
QuestionGetter PinmemberC-P-User-35-Nov-12 2:49 
AnswerRe: Getter PinmemberJ4amieC5-Nov-12 3:01 
GeneralRe: Getter [modified] PinmemberC-P-User-35-Nov-12 4:30 
GeneralRe: Getter PinmvpDave Kreskowiak5-Nov-12 4:43 
GeneralRe: Getter PinmemberJ4amieC5-Nov-12 4:44 
GeneralRe: Getter PinprotectorPete O'Hanlon5-Nov-12 4:47 
AnswerRe: Getter PinmvpAbhinav S5-Nov-12 5:37 
GeneralRe: Getter PinmemberC-P-User-35-Nov-12 7:18 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    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
Web01 | 2.8.141015.1 | Last Updated 22 Oct 2014
Copyright © CodeProject, 1999-2014
All Rights Reserved. Terms of Service
Layout: fixed | fluid