Click here to Skip to main content
15,889,403 members
Home / Discussions / C#
   

C#

 
GeneralRe: Culture extrange behavior Pin
Norman-Timo3-Aug-04 1:20
Norman-Timo3-Aug-04 1:20 
GeneralRe: Culture extrange behavior Pin
Jose Vicente3-Aug-04 3:14
Jose Vicente3-Aug-04 3:14 
QuestionHow to save status of runtime controls? Pin
sachinkalse2-Aug-04 21:24
sachinkalse2-Aug-04 21:24 
AnswerRe: How to save status of runtime controls? Pin
Norman-Timo3-Aug-04 0:52
Norman-Timo3-Aug-04 0:52 
GeneralIdentify max no of child nodes for a node in XML Pin
saud_a_k2-Aug-04 20:49
saud_a_k2-Aug-04 20:49 
GeneralRe: Identify max no of child nodes for a node in XML Pin
Norman-Timo3-Aug-04 1:06
Norman-Timo3-Aug-04 1:06 
GeneralRe: Identify max no of child nodes for a node in XML Pin
saud_a_k3-Aug-04 1:35
saud_a_k3-Aug-04 1:35 
GeneralRe: Identify max no of child nodes for a node in XML Pin
Norman-Timo3-Aug-04 1:54
Norman-Timo3-Aug-04 1:54 
Ok if I understand it correctly:

You want to have first level Nodes and especially that one with the most child nodes?
In your case the nodes with "customer id..."?

But than you can take the first part from my example (the part until you have the 'doc' XML file and your root node.

Than you can do it in an analogue way:

***************************************************
int maxChildCount = 0;
XmlNode mostChildNode = null;

actNode = root.FirstChild; // then you have the first customer node!

while (actNode != null)
{
if (maxChildCount < actNode.ChildNodes.Count)
{
maxChildCount = actNode.ChildNodes.Count;
mostChildNode = actNode;
}

actNode = actNode.NextSibling;
}

*************************************************

The reason that my program is not working is maybe the fact, that I typed in the source directly in this reply-form (sorry).

But you are certainly able to correct compiler errrors, I think. (if there are some)

I think with these line of code you have your solution, if I understand you right.

I´m sorry if I´m not correct again.

Norman-Timo


Edited:
By the way with what html tags can I highlite the code sources?
GeneralRe: Identify max no of child nodes for a node in XML Pin
saud_a_k3-Aug-04 2:38
saud_a_k3-Aug-04 2:38 
GeneralRe: Identify max no of child nodes for a node in XML Pin
leppie3-Aug-04 1:52
leppie3-Aug-04 1:52 
GeneralRe: Identify max no of child nodes for a node in XML Pin
saud_a_k3-Aug-04 2:31
saud_a_k3-Aug-04 2:31 
GeneralProblem accessing array of objects Pin
crushinghellhammer2-Aug-04 20:33
crushinghellhammer2-Aug-04 20:33 
GeneralRe: Problem accessing array of objects Pin
misterbear2-Aug-04 23:22
misterbear2-Aug-04 23:22 
GeneralRe: Problem accessing array of objects Pin
Stefan Troschuetz2-Aug-04 23:35
Stefan Troschuetz2-Aug-04 23:35 
QuestionIs there an MMC Snap-in Designer for .NET environment? Pin
zzzhouzhou2-Aug-04 18:34
zzzhouzhou2-Aug-04 18:34 
Generalprobability Pin
Member 7040992-Aug-04 17:39
Member 7040992-Aug-04 17:39 
GeneralRe: probability Pin
SOCM_FP_CPP3-Aug-04 1:28
SOCM_FP_CPP3-Aug-04 1:28 
QuestionC++ class defined in header file. Implementation in C# ? Pin
crushinghellhammer2-Aug-04 14:42
crushinghellhammer2-Aug-04 14:42 
AnswerRe: C++ class defined in header file. Implementation in C# ? Pin
Christian Graus2-Aug-04 14:56
protectorChristian Graus2-Aug-04 14:56 
GeneralData Grid problem Pin
Anonymous2-Aug-04 13:33
Anonymous2-Aug-04 13:33 
QuestionMoved code breaks? Pin
Chris Korzeniowski2-Aug-04 13:09
Chris Korzeniowski2-Aug-04 13:09 
AnswerRe: Moved code breaks? Pin
Jay Shankar2-Aug-04 19:00
Jay Shankar2-Aug-04 19:00 
AnswerRe: Moved code breaks? Pin
sreejith ss nair2-Aug-04 19:22
sreejith ss nair2-Aug-04 19:22 
GeneralRe: Moved code breaks? Pin
Jay Shankar2-Aug-04 22:41
Jay Shankar2-Aug-04 22:41 
Questioncan't define a static method in an interface....? Pin
Jan R Hansen2-Aug-04 11:53
Jan R Hansen2-Aug-04 11:53 

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.