Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Create summary from xml

0 views
Skip to first unread message

Rookie

unread,
Dec 15, 2009, 7:51:36 AM12/15/09
to
I have the next challenge.
I read in an xml file and read two relevant attributes from an element.
So far so good.

But after reading the xml file i want to create a report with the values of
the attributes and the occurences (create a summary).

for example:

Attribute Value Occurence
--------- ------ -----------

name John 10
Jessica 3
Abby 15
. . .

state Alabama 5
Georgia 15
Montana 30
. . .

I suppose i need to to use some two dimensional collection, but which one
and how to deal with the occurences.
(add, replace, updtate items ??)

Thanks in advance,

Rookie


Sharon

unread,
Dec 15, 2009, 10:43:24 AM12/15/09
to
Hi,
I would use LINQ to XML grouping capabilities.
Or, if you already parsed the XML to a collection,
You can use LINQ to Objects.


http://msdn.microsoft.com/en-us/library/bb387098.aspx
http://msdn.microsoft.com/en-us/library/bb397919.aspx

"Rookie" <roo...@nomail.notvalid> wrote in message
news:uSgsXVYf...@TK2MSFTNGP04.phx.gbl...

Robertico

unread,
Dec 18, 2009, 8:27:45 AM12/18/09
to
thx. Fixed.

Rookie
"Sharon" <vo...@null.nothing> wrote in message
news:uf0Pr1Zf...@TK2MSFTNGP06.phx.gbl...

0 new messages