Click here to Skip to main content
15,891,473 members
Home / Discussions / C#
   

C#

 
GeneralTooltip Pin
bertcox11-May-04 4:32
bertcox11-May-04 4:32 
GeneralMessage Removed Pin
11-May-04 4:45
wibblewibblewibble11-May-04 4:45 
GeneralRe: Tooltip Pin
Heath Stewart11-May-04 4:50
protectorHeath Stewart11-May-04 4:50 
GeneralMessage Removed Pin
11-May-04 4:55
wibblewibblewibble11-May-04 4:55 
GeneralRe: Tooltip Pin
Heath Stewart11-May-04 4:57
protectorHeath Stewart11-May-04 4:57 
GeneralRe: Tooltip Pin
bertcox11-May-04 5:05
bertcox11-May-04 5:05 
GeneralRe: Tooltip Pin
Heath Stewart11-May-04 4:48
protectorHeath Stewart11-May-04 4:48 
GeneralXML parsing in C# using XMLDataDocument Pin
pankajdaga11-May-04 4:30
pankajdaga11-May-04 4:30 
Hi everyone,

I am having trouble parsing a certain XML structure. I am trying to create an ASP.NET based flowchart editor. All the state transitions etc. are stored as XML and I was hoping to read the XML into appropriate data structures and render them using the graphics library for ASP.NET.

Here is an example XML for a very simple flow chart:

<begin>
<decision> // a deision tree
<value>(x == y OR y == z)</value> // condition
<option>
<value>No</value> // condition not met
<action>Do 1</action> // Do 1
</option>
<option>
<value>Yes</value> // condition met
<decision> // Another decision tree.
<value>a == b</value>
<option>
<value>No</value> +
<action>Do X</action>\n" +
</option>
<option>
<value>Yes</value>
<action>Do Y</action>
</option>
</decision> // sub decision
</option>
</decision> // main decision
</begin>

My problem is how do I parse this XML with such nested decision trees. Potentially they can go many level down. Do I have to use something like recursion here?

Some small example or code snippet would be really helpful.

Thanks,
Pankaj

Without struggle, there is no progress
GeneralRe: XML parsing in C# using XMLDataDocument Pin
Heath Stewart11-May-04 4:55
protectorHeath Stewart11-May-04 4:55 
GeneralRe: XML parsing in C# using XMLDataDocument Pin
pankajdaga11-May-04 5:03
pankajdaga11-May-04 5:03 
GeneralRe: XML parsing in C# using XMLDataDocument Pin
Heath Stewart11-May-04 5:06
protectorHeath Stewart11-May-04 5:06 
GeneralRe: XML parsing in C# using XMLDataDocument Pin
Alex Getman11-May-04 6:12
Alex Getman11-May-04 6:12 
GeneralRe: XML parsing in C# using XMLDataDocument Pin
Alex Getman11-May-04 6:15
Alex Getman11-May-04 6:15 
GeneralRe: XML parsing in C# using XMLDataDocument Pin
Alex Getman11-May-04 6:50
Alex Getman11-May-04 6:50 
GeneralWindows Form UI component libraries Pin
Paul Watson11-May-04 2:50
sitebuilderPaul Watson11-May-04 2:50 
GeneralRe: Windows Form UI component libraries Pin
Judah Gabriel Himango11-May-04 3:52
sponsorJudah Gabriel Himango11-May-04 3:52 
GeneralRe: Windows Form UI component libraries Pin
Paul Watson11-May-04 4:03
sitebuilderPaul Watson11-May-04 4:03 
GeneralRe: Windows Form UI component libraries Pin
Heath Stewart11-May-04 4:43
protectorHeath Stewart11-May-04 4:43 
GeneralRe: Windows Form UI component libraries Pin
Paul Watson11-May-04 4:47
sitebuilderPaul Watson11-May-04 4:47 
GeneralRe: Windows Form UI component libraries Pin
Heath Stewart11-May-04 4:51
protectorHeath Stewart11-May-04 4:51 
GeneralRe: Windows Form UI component libraries Pin
Michael P Butler11-May-04 5:40
Michael P Butler11-May-04 5:40 
GeneralRe: Windows Form UI component libraries Pin
Paul Watson11-May-04 6:06
sitebuilderPaul Watson11-May-04 6:06 
GeneralRe: Windows Form UI component libraries Pin
leppie11-May-04 7:13
leppie11-May-04 7:13 
QuestionHow to use Amazon Web Services.. Pin
Sumit Kapoor11-May-04 2:46
Sumit Kapoor11-May-04 2:46 
AnswerRe: How to use Amazon Web Services.. Pin
Paul Watson11-May-04 2:54
sitebuilderPaul Watson11-May-04 2:54 

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.