File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes XML and Related Technologies and the fly likes Copying xml into another on a condition Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Engineering » XML and Related Technologies
Bookmark "Copying xml into another on a condition" Watch "Copying xml into another on a condition" New topic

Copying xml into another on a condition

Vivian Josh
Ranch Hand

Joined: Oct 31, 2006
Posts: 112
Hi Ranchers.,

I am trying to copy one XML into other but I only want to copy entire block of elements if one particular child tag exist.

For example


So in above xml I want copy all <element> tags only if <c1> exist in that.

How do I achieve that?

Thanks in advance ,

Paul Clapham

Joined: Oct 14, 2005
Posts: 18541

With an if-statement?

You're going to have to be more specific about exactly what it is you can't do. What have you got so far?
jQuery in Action, 2nd edition
subject: Copying xml into another on a condition
Similar Threads
Dozer-5.3.2: Assistance mapping object dependencies.
simple example problem
How to remove common item between 2 ArrayList
Combinations Algorithm
Select All