Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Splitting an element

Status
Not open for further replies.

frenchxmlnewbie

Technical User
Sep 21, 2009
2
0
0
FR
Hello

I would like to split the following code:
<code>
<topic>
<text value="My Topic" />
<ap:Task DurationUnit="urn:mindjet:Hour" TaskPercentage="50" TaskPriority="urn:mindjet:prio1" Dirty="0000000000000001" DurationHours="3" StartDate="2009-09-15T11:00:49" DeadlineDate="2009-10-13T11:00:49" Resources="François Guillaumin"/>
</topic>
</code>
getting all attribute names, and create in the result as many atributes as elements:
<code>
<node text="My Topic">
<attribute Name="DurationUnit" Value="urn:mindjet:Hour" />
<attribute Name="TaskPercentage" Value="50" />
...
</node>
</code>

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top