View Single Post
  #1 (permalink)  
Old August 14th, 2010, 06:14 AM
metinhoclam metinhoclam is offline
Authorized User
 
Join Date: Jul 2010
Posts: 27
Thanks: 6
Thanked 0 Times in 0 Posts
Default How to check whether an elements contains another elements or not?

I have the source xml document:
Code:
<?xml version="1.0" encoding="UTF-8"?>
<listbox>
	<box id="a1" size="24">
		<numberofball>3</numberofball>
	</box>
	<box id="a2" size="64">
		<numberofball>3</numberofball>
	</box>
	<box id="a3" size="36">
		<numberofball>3</numberofball>
	</box>
	<box id="a4" size="42"/>
	<box id="a5" size="43"/>
</listbox>
And I wanna export to following document:
Code:
<categorybox>
	<notemptybox>a1</notemptybox>
	<notemptybox>a2</notemptybox>
	<notemptybox>a3</notemptybox>
	<emptybox>a4</emptybox>
	<emptybox>a5</emptybox>
</categorybox>
Could anybody help me?
Reply With Quote