Results 1 to 1 of 1
- 11-23-2007, 03:36 PM #1
Member
- Join Date
- Nov 2007
- Posts
- 1
- Rep Power
- 0
Dom4j probelm with clearContent method
PLease, can somehone tell me (some snipplet or so) what is the way to remove a node (for example <Channel> node in the following XML) from a XMl File ?
I would like the method to be
public Document removeListChannels(Document doc, List<String> cForRemove)
where cForRemove is a list of ChannelIds.
<?xml version="1.0" encoding="UTF-8"?>
<MiTV context="EPG:Now">
<ReturnCode>0</ReturnCode>
<ReturnMessage>Your request was successful...</ReturnMessage>
<Channel>
<ChannelId>MiTeleTV_4_DEM_19</ChannelId>
<ChannelName nav="1">Antena 3</ChannelName>
<ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_4.jpg</ChannelLogo>
</Channel>
<Channel>
<ChannelId>MiTeleTV_3_DEM_19</ChannelId>
<ChannelName nav="1">Cuatro</ChannelName>
<ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_426.jpg</ChannelLogo>
<Program programId="MiTeleTV_3_DEM_19_2007-11-17-18-54-00_1194963560496">
<Title>News</Title>
<ProgramStartTime nav="1">1h 54mn</ProgramStartTime>
<ProgramEndTime nav="1">6mn</ProgramEndTime>
</Program>
</Channel>
<Channel>
<ChannelId>MiTeleTV_2_DEM_19</ChannelId>
<ChannelName nav="1">La 2</ChannelName>
<ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_153.jpg</ChannelLogo>
</Channel>
<Channel>
<ChannelId>MiTeleTV_1_DEM_19</ChannelId>
<ChannelName nav="1">Tve</ChannelName>
<ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_152.jpg</ChannelLogo>
</Channel>
<Channel>
<ChannelId>MiTeleTV_0_DEM_19</ChannelId>
<ChannelName nav="1">Canal Promocional</ChannelName>
<ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_392.jpg</ChannelLogo>
</Channel>
<ClientURL nav="1">http://localhost2/client/Nokia/Nokia1.sis</ClientURL>
<IndexCurrent nav="1">0</IndexCurrent>
</MiTV>
Thanks in advace
Alejandra OrtegaLast edited by aorteu; 11-26-2007 at 12:17 PM.
Similar Threads
-
JTree Programmatic Node Expansion and Selection Probelm
By hemanthjava in forum AWT / SwingReplies: 3Last Post: 01-16-2013, 07:23 AM -
method not abstract, does not override actionperformed method.
By Theman in forum New To JavaReplies: 2Last Post: 03-26-2010, 05:12 PM -
Method Help
By pringle in forum New To JavaReplies: 4Last Post: 04-16-2008, 01:23 PM -
Gridbag Layout Probelm
By hemanthjava in forum AWT / SwingReplies: 3Last Post: 12-04-2007, 05:12 PM -
how to generate xml with Dom4j
By leonard in forum XMLReplies: 1Last Post: 08-06-2007, 04:39 PM


LinkBack URL
About LinkBacks
Reply With Quote
Bookmarks