[jdom-interest] API REQUEST: Allow a branch in a tree to be s erialized according to a parameter

GB/DEV - Philip Nelson philip.nelson at omniresources.com
Sat Mar 10 22:13:03 PST 2001


 The serializing is easy.  Just navigate to the element with getChild calls
and then use XMLOutputter to output the element.  The filtering you will
have to do yourself though.

good luck!

-----Original Message-----
From: Jonathan
To: jdom-interest at jdom.org
Sent: 3/10/01 9:58 AM
Subject: [jdom-interest] API REQUEST: Allow a branch in a tree to be
serialized according to a parameter

Allow a branch in a tree to be limitedly serialized according to a
parameter
EX: in the following xml I want to navigate to the "group" level and get
all the "publication" children who meet a certain criteria as one
string:
 
<configuration name="content_status_changer">
    <publication_groups>
        <group name="billboard" log_path="/content_status_change_logs"
jsp_home="maintenance_billboard.jsp">
            <publication name="musician_magazine" display="Musician
Magazine"/>
            <publication name="billboard" display="Billboard Magazine"/>
            <publication name="dinesh_music_review" display="Dinesh's
Music Review"/>
            <publication name="cindys_chinese_recipies" display="Cindy's
Recipies"/>
        </group>
    </publication_groups>
</configuration>
 
 
I would get as a return the string
<publication name="musician_magazine" display="Musician Magazine"/>
<publication name="billboard" display="Billboard Magazine"/>
<publication name="dinesh_music_review" display="Dinesh's Music
Review"/>
<publication name="cindys_chinese_recipies" display="Cindy's Recipies"/>



More information about the jdom-interest mailing list