更好地理解XML解析C#WindowsForms

时间:2020-04-27 13:51:12

标签: c# xml windows-forms-designer

花了两天时间试图用这种方法来敲打我的头,阅读不同的示例,但是在到达需要的位置时遇到了麻烦。可能是因为我需要的XML表现不佳而没有选择可用的解析选项的组合。我的背景是有限的“低挂水果”编码。

代码流:

User selects from first dropdown (comboBox)
   -Current being populated by parsing first xml file
   -XDocument using .Element/.Elements, and a foreach string
Listbox is populated based on combobox selection
   -Separate XML as workaround, wanting to fix
   -Same method to parse the file
User selects items
   -Once selections are done, user clicks a done button
   -Some selections are going to need be passed as is to an output file
   -Other selections are going to be edited in the program
          -Theory was to have another xml element that is either True or False string
User selects those that need editing, loads an xml element into the richtextbox, user changes/defines specifics, and sends to the output filehandler

数据结构xml#1

<root>
 <subtype>
   <name>
   <Description>
 </subtype> #Rinse/Repeat

数据结构xml#2

<root>
  <Short Name as seen in xml#1>
     <name>
     <description for richTextBox>
     <Edit true/false>
  </Short Name>

我(应该)能够处理文件处理/输出端,它的xml设计和解析很困难。从逻辑上讲,将其制成单个xml对我来说更明智。正确重做此操作的建议/资源,这样有意义并更容易解析/迭代该程序?

0 个答案:

没有答案