Click here to Skip to main content
15,896,201 members
Home / Discussions / C#
   

C#

 
QuestionPC Crashed: Getting "Class Library Cannot be Started Directly" error Pin
boreland27-Apr-10 14:38
boreland27-Apr-10 14:38 
AnswerRe: PC Crashed: Getting "Class Library Cannot be Started Directly" error Pin
Luc Pattyn27-Apr-10 15:07
sitebuilderLuc Pattyn27-Apr-10 15:07 
QuestionDLL Decomplile Pin
Abdullah S. Abdelhay27-Apr-10 8:24
Abdullah S. Abdelhay27-Apr-10 8:24 
AnswerRe: DLL Decomplile Pin
Dimitri Witkowski27-Apr-10 8:31
Dimitri Witkowski27-Apr-10 8:31 
AnswerRe: DLL Decomplile Pin
Ian Shlasko27-Apr-10 8:32
Ian Shlasko27-Apr-10 8:32 
AnswerRe: DLL Decomplile Pin
Pete O'Hanlon27-Apr-10 22:36
mvePete O'Hanlon27-Apr-10 22:36 
AnswerRe: DLL Decomplile Pin
harold aptroot28-Apr-10 2:00
harold aptroot28-Apr-10 2:00 
QuestionReading & Modifying XML Data in C# Pin
GrgBalden27-Apr-10 6:53
GrgBalden27-Apr-10 6:53 
Hi Guys

Hope you can help. I'm writing a program to do a record count within an XML file

The XML file is structured as per below:

<WEBRequest>
  <Request>
    <BlockA>
      <REC>
        <CustomerNumber></CustomerNumber>
        <FirstName></FirstName>
        <LastName></LastName>
        <Email></Email>
      </REC>
    </BlockA>
    <BlockB>
      <REC>
        <FirstName></FirstName>
        <LastName></LastName>
        <OrderDetail></OrderDetail>
        <PartType></PartType>
      </REC>
      <REC>
        <FirstName></FirstName>
        <LastName></LastName>
        <OrderDetail></OrderDetail>
        <PartType></PartType>
      </REC>
      <REC>
        <FirstName></FirstName>
        <LastName></LastName>
        <OrderDetail></OrderDetail>
        <PartType></PartType>
      </REC>
    </BlockB>
    <BlockC>
      ....
      ....
      ....
      ....
    </BlockC>
    ....
    ....
    ....
  </Request>


What I need to do is count and output number of <REC>'s for each <Block> element and output to a cell within excel (Excel Automation is working).

E.g.

BlockA = 1 REC
BlockB = 3 REC
.
.
.
BlockM = 32 REC

I have the excel automated correctly, however, I'm afraid that my inexperience with XML is quite telling, so I dont have a clear idea on how to do the record count.

Thanks in advance!!!

Grg!
AnswerRe: Reading & Modifying XML Data in C# Pin
Dan Mos27-Apr-10 7:17
Dan Mos27-Apr-10 7:17 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden27-Apr-10 23:33
GrgBalden27-Apr-10 23:33 
GeneralRe: Reading & Modifying XML Data in C# [modified] Pin
Dan Mos28-Apr-10 3:24
Dan Mos28-Apr-10 3:24 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden28-Apr-10 4:43
GrgBalden28-Apr-10 4:43 
GeneralRe: Reading & Modifying XML Data in C# Pin
Dan Mos28-Apr-10 8:02
Dan Mos28-Apr-10 8:02 
GeneralRe: Reading & Modifying XML Data in C# Pin
GrgBalden28-Apr-10 10:44
GrgBalden28-Apr-10 10:44 
QuestionCheckbox on the ColumnHeader [modified] Pin
Natural_Demon27-Apr-10 4:55
Natural_Demon27-Apr-10 4:55 
AnswerRe: Checkbox on the ColumnHeader [modified] Pin
Natural_Demon27-Apr-10 5:39
Natural_Demon27-Apr-10 5:39 
AnswerRe: Checkbox on the ColumnHeader Pin
Natural_Demon27-Apr-10 9:12
Natural_Demon27-Apr-10 9:12 
QuestionHow Secure are MDF DB Files? Pin
Caniac21727-Apr-10 2:21
Caniac21727-Apr-10 2:21 
AnswerRe: How Secure are MDF DB Files? Pin
Michel Godfroid27-Apr-10 3:35
Michel Godfroid27-Apr-10 3:35 
GeneralRe: How Secure are MDF DB Files? Pin
Caniac21727-Apr-10 4:23
Caniac21727-Apr-10 4:23 
QuestionMessage Removed Pin
27-Apr-10 2:17
Emmet_Brown27-Apr-10 2:17 
AnswerRe: form design / update clash Pin
Rajesh Anuhya27-Apr-10 2:21
professionalRajesh Anuhya27-Apr-10 2:21 
GeneralRe: form design / update clash Pin
Emmet_Brown27-Apr-10 3:51
Emmet_Brown27-Apr-10 3:51 
GeneralRe: form design / update clash Pin
AspDotNetDev27-Apr-10 18:14
protectorAspDotNetDev27-Apr-10 18:14 
JokeRe: form design / update clash Pin
Calla27-Apr-10 20:01
Calla27-Apr-10 20:01 

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.