Create/Remove from existing xml
Hi,
I was wondering if you could shed some light about how use LINQ TO XML to achieve the simple task below. Is it possible?
I need to create/modify an xml document based on an existing in memory xml.
example
Suppose I have this xml in memory
<table>
<layout>
<col>1</col>
<col>2</col>
<col>3</col>
<col>4</col>
<col>5</col>
<col>6</col>
<col>7</col>
<layout>
<table>
Please not that it has 7 col elements (there could be any number of col elements).
I need to pass this xml to a function to be transformed with xlst but I have to pass only 3 col elements at a time.
So the first time I would pass the first 3 cols
<table>
<layout>
<col>1</col>
<col>2</col>
<col>3</col>
<layout>
<table>
Then the next 3
<table>
<layout>
<col>4</col>
<col>5</col>
<col>6</col>
<layout>
<table>
Then the remaining in this case only 1 col
<table>
<layout>
<col>7</col>
<layout>
<table>
Cheers
C
|