Results 1 to 1 of 1
  1. #1
    aorteu is offline Member
    Join Date
    Nov 2007
    Posts
    1
    Rep Power
    0

    Default 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 Ortega
    Last edited by aorteu; 11-26-2007 at 01:17 PM.

Similar Threads

  1. JTree Programmatic Node Expansion and Selection Probelm
    By hemanthjava in forum AWT / Swing
    Replies: 3
    Last Post: 01-16-2013, 08:23 AM
  2. Replies: 2
    Last Post: 03-26-2010, 06:12 PM
  3. Method Help
    By pringle in forum New To Java
    Replies: 4
    Last Post: 04-16-2008, 02:23 PM
  4. Gridbag Layout Probelm
    By hemanthjava in forum AWT / Swing
    Replies: 3
    Last Post: 12-04-2007, 06:12 PM
  5. how to generate xml with Dom4j
    By leonard in forum XML
    Replies: 1
    Last Post: 08-06-2007, 05:39 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •