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

    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">
    <ReturnMessage>Your request was successful...</ReturnMessage>
    <ChannelName nav="1">Antena 3</ChannelName>
    <ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_4.jpg</ChannelLogo>
    <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">
    <ProgramStartTime nav="1">1h 54mn</ProgramStartTime>
    <ProgramEndTime nav="1">6mn</ProgramEndTime>
    <ChannelName nav="1">La 2</ChannelName>
    <ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_153.jpg</ChannelLogo>
    <ChannelName nav="1">Tve</ChannelName>
    <ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_152.jpg</ChannelLogo>
    <ChannelName nav="1">Canal Promocional</ChannelName>
    <ChannelLogo nav="1">http://localhost/IMG_MITV/channel/MiTeleTV_392.jpg</ChannelLogo>
    <ClientURL nav="1">http://localhost2/client/Nokia/Nokia1.sis</ClientURL>
    <IndexCurrent nav="1">0</IndexCurrent>

    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, 01: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, 04: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