Click here to Skip to main content
15,994,794 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Okay, I give up. Haven’t found an elegant solution to this problem yet. I need to transform the following data

Snippet
XML
<Head>
    <Col>Share</Col>
    <Col>Directory</Col>
    <Col>Share ACL</Col>
</Head>
<Row Grade="4">
    <Col>ADMIN$</Col>
    <Col>C:\WINDOWS</Col>
    <Col>Admin Share</Col>
</Row>
<Row Grade="4">
    <Col>C$</Col>
    <Col>C:\</Col>
    <Col>Admin Share</Col>
</Row>
<Row Grade="4">
    <Col>S21AUTH</Col>
    <Col>C:\auth21</Col>
    <Col>Everyone -  F</Col>
</Row>


Into the following


XML
<item>
    <head>Share</head>
    <Grade>4</Grade>
    <Col>ADMIN$</Col>
</item>

<item>
    <head>Directory</head>
    <Grade>4</Grade>
    <Col>C:\WINDOWS</Col>
</item>

<item>
    <head>Directory</head>
    <Grade>4</Grade>
    <Col>Share ACL</Col>
</item>

<item>
    <head>Directory ACL</head>
    <Grade>4</Grade>
    <Col>Admin Share</Col>
</item>




Anyone have any ideas how to do so?
Posted
Comments
[no name] 2-Nov-11 19:16pm    
I give up. What have you tried?

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900