From: Laurent Forêt (l.foret@korom.net)
Date: 01/08/2001 - 10:30
le boolean mis a vrai veut dire que l'on veut récuperer toute l'arborescence
de ce noeud
mise a faux on prend que le noeud et pas sa descendance .
Extrait de l'apidoc de Xerces :
public Node importNode(Node source,
boolean deep)
throws DOMException
Copies data from the source node. Unlike cloneNode, this _can_ copy data
from another document. If the source document is also based on
org.apache.xerces.dom, we will attempt to preserve the domimpl- internal
data by doing a clone-and-reparent. If not, we will use the source's public
methods, and this document's Factory methods, to copy data defined by the
DOM interfaces. Its behavior is otherwise similar to that of cloneNode.
Attempting to import a Document into another Document is meaningless -- a
new Document would not improve matters much, and a DocumentFragment couldn't
carry the DocumentType child (if any). Best thing we can do is throw a
HIERARCHY_REQUEST_ERR. ????? Should we push some of this down to copy-ctors,
so subclassed DOMs have the option of special-casing each other (as we do
for ourself)?
Specified by:
importNode in interface Document
Following copied from interface: org.w3c.dom.Document
Parameters:
importedNodeThe - node to import.
deepIf - true, recursively import the subtree under the specified node; if
false, import only the node itself, as explained above. This has no effect
on Attr , EntityReference, and Notation nodes.
Returns:
The imported node that belongs to this Document.
Throws:
DOMException - NOT_SUPPORTED_ERR: Raised if the type of node being imported
is not supported.
-------------------------------------
Laurent Forêt
Service développement
l.foret@korom.net
www.korom.net
> -----Message d'origine-----
> De : xml-tech-bounce@xmlfr.org [mailto:xml-tech-bounce@xmlfr.org]De la
> part de Yann Le Roux
> Envoyé : mercredi 1 août 2001 12:22
> À : xml-tech@xmlfr.org
> Objet : [xml-tech] Re: Xml+Java
>
>
> Je vous remercie pour votre réponse mais la méthode "importNode" comporte
> deux variable, je dois lui indiquer mon noeud et un boolean, je voudrais
> savoir ce qu'il faut mettre pour ce boolean
> ImportNode(node,boolean) ?
> Merci d'avance
> ----- Original Message -----
> From: "Erwan Le Pabic" <e.lepabic@webedisoft.com>
> To: <xml-tech@xmlfr.org>
> Sent: Wednesday, August 01, 2001 12:05 PM
> Subject: [xml-tech] Re: Xml+Java
>
>
> >
> > Bonjour,
> >
> >
> > // Récupération des noeuds "liens" du Document dossier
> > NodeList list = dossier.getElementsByTagName("liens");
> >
> > // Import dans le document video des noeuds trouvés
> > Node importedNode;
> > for (int i = 0; i < list.getLength(); i++) {
> > importedNode = video.importNode(list.item(i));
> >
> > // Puis ajout ou insertion de "importedNode" à l'endroit voulu avec les
> > méthodes appendChild() ou // insertBefore()
> > }
> >
> > >
> > > Bonjour,
> > >
> > > Voilà sous java avec le parser Dom j'aimerais faire une petite
> > > application mais j'ai des problèmes.
> > > J'ai un document Xml "Dossier" au départ, je voudrais récupérer
> > > dans ce dossier tous les noeuds "liens" et les insérer dans un
> > > document Xml qui existe déja "vidéo" mais je ne sais pas
> comment faire ?
> > > Yann LE ROUX
> > > Analyste Programmeur
> > > L'EQUIPE
> > > e-mail : yleroux@lequipe.fr
> > >
> > > --
> > > Devenez redacteur <XML>fr et contribuez au developpement du
> > > xml francophone (http://xmlfr.org/infos/redacteurs/) !
> > >
> > > Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
> > >
> > > Cette liste est a votre disposition pour discuter en francais de
> > > tout sujet technique lie a XML.
> > >
> > > Pour resilier votre abonnement, envoyez un message contenant
> > > la commande "unsubscribe" a xml-tech-request@xmlfr.org
> > > (mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
> > >
> >
> >
> > --
> > Devenez redacteur <XML>fr et contribuez au developpement du
> > xml francophone (http://xmlfr.org/infos/redacteurs/) !
> >
> > Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
> >
> > Cette liste est a votre disposition pour discuter en francais de
> > tout sujet technique lie a XML.
> >
> > Pour resilier votre abonnement, envoyez un message contenant
> > la commande "unsubscribe" a xml-tech-request@xmlfr.org
> > (mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
> >
> >
> >
>
>
>
> --
> Devenez redacteur <XML>fr et contribuez au developpement du
> xml francophone (http://xmlfr.org/infos/redacteurs/) !
>
> Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
>
> Cette liste est a votre disposition pour discuter en francais de
> tout sujet technique lie a XML.
>
> Pour resilier votre abonnement, envoyez un message contenant
> la commande "unsubscribe" a xml-tech-request@xmlfr.org
> (mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
>
>
--
Devenez redacteur <XML>fr et contribuez au developpement du
xml francophone (http://xmlfr.org/infos/redacteurs/) !
Liste de diffusion "xml-tech@xmlfr.org" (http://xmlfr.org).
Cette liste est a votre disposition pour discuter en francais de
tout sujet technique lie a XML.
Pour resilier votre abonnement, envoyez un message contenant
la commande "unsubscribe" a xml-tech-request@xmlfr.org
(mailto:xml-tech-request@xmlfr.org?Subject=unsubscribe)
Archive générée par hypermail 2.1.3 le 28/06/2004 - 11:06 UTC
webmaster@xmlfr.org
|