[From nobody Fri Aug 6 17:06:36 2004 X-Mozilla-Status2: 00000000 Message-ID: <3B3B69E3.EB4ADDC3@swsgmbh.de> Date: Thu, 28 Jun 2001 18:31:15 +0100 From: Markus Bernhardt <mbernhardt@swsgmbh.de> X-Mailer: Mozilla 4.5 [en] (WinNT; I) X-Accept-Language: en MIME-Version: 1.0 To: Adnan Oeztuerk <oeztuerk@novedia.de> Subject: Re: [jdom-interest] can I insert a XML-tag of one to another XML-file? References: <00c501c0ffe0$130cff70$eb2aa8c0@novedia.de> Content-Type: multipart/mixed; boundary="------------32AB76FA3AE2632508C88771" This is a multi-part message in MIME format. --------------32AB76FA3AE2632508C88771 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Hi, try: SAXBuilder builder = new SAXBuilder(); Document orderDoc = builder.build(new File("order.xml")); Document applicationDoc = builder.build(new File("application.xml")); Element dbcommandElement = (Element) orderDoc.getRootElement().getChild("dbcommand").clone(); applicationDoc.getRootElement().addContent(dbcommandElement); Are you sure you are using JDOM ? - markus Adnan Oeztuerk wrote: > Hi, > > can I insert a XML-tag of one to another XML-file? > (not complete insert a XML-file) > > e.g. > > order.xml > ------------ > <function name="order"> > <dbcommand> > SELECT * from Customer > </dbcommand> > </function> > > application.xml > ---------------- > <application> > <!-- include order.xml/<dbcommand> ? --> > </apllication> > > I used Xinclude engine 1.0d5 but it doesn't worked: ( java > com.macfaq.xml.XIncluder application.xml) > > ----------------------------------------------------------------- > <application xmlns:xi="http://www.w3.org/1999/XML/xinclude"> > <xi:include parse="xml" > href="order.xml#xpointer(/function/dbcommand)"/> > </apllication> > ----------------------------------------------------------------- > > thanks, > ado > > _______________________________________________ > To control your jdom-interest membership: > http://lists.denveronline.net/mailman/options/jdom-interest/youraddr@yourhost.com --------------32AB76FA3AE2632508C88771 Content-Type: text/x-vcard; charset=us-ascii; name="mbernhardt.vcf" Content-Transfer-Encoding: 7bit Content-Description: Card for Markus Bernhardt Content-Disposition: attachment; filename="mbernhardt.vcf" begin:vcard n:Bernhardt;Markus tel;cell:0171-5770462 tel;fax:089-420903-20 tel;home:089-6378949 tel;work:089-420903-14 x-mozilla-html:FALSE url:www.swsgmbh.de org:Software Service Wulf Schupp GmbH;Spieljoch adr:;;Spieljochstr. 34;München;;81825;Germany version:2.1 email;internet:mbernhardt@swsgmbh.de title:Entwicklungsleiter note;quoted-printable:[dF]Quisam=0D=0Awww.discordian-Front.de=0D=0AHail Eris !!!=0D=0AHappy Frag !!! fn:Markus Bernhardt end:vcard --------------32AB76FA3AE2632508C88771-- ]