[jdom-interest] JDOM & security
julian.enticknap at aethos.co.uk
julian.enticknap at aethos.co.uk
Wed Aug 2 03:21:07 PDT 2000
Hi
If you call clone() on a element it will set the parent reference to
null. So you could do;
Element root = doc.getRootElement();
Element child = root.getChild("config");
if (child != null ) {
doConfig((Element)child.clone());
} else {
// Get upset and stuff.....
}
Hope it helps.
--Jools
> Hi,
> I'm currently using XML to configure components of my application.
> Each component should get access to the information it needs, but not
to the whole xml-
> file.
> Because of element.getParent() every part of the programm, that can
access one node of
> the document, can access (and modify) the whole document.
> I don't know if I'm the only one having this problem, but I guess this
is a general one.
> Is it possible to but something like :
> SecurityManager security = System.getSecurityManager();
> if (security != null) {
> JDOMAccessParentPermission perm = new JDOMAccessParentPermission();
> security.checkPermission(perm);
> }
> in this method ?
> Niklas
> _______________________________________________
> To control your jdom-interest membership:
>
http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yo
urhost.com
More information about the jdom-interest
mailing list