LISTSERV mailing list manager LISTSERV 15.5

Help for XML-L Archives


XML-L Archives

XML-L Archives


View:

Next Message | Previous Message
Next in Topic | Previous in Topic
Next by Same Author | Previous by Same Author
Chronologically | Most Recent First
Proportional Font | Monospaced Font

Options:

Join or Leave XML-L
Reply | Post New Message
Search Archives


Subject: Concating Elements from different Documents?
From: Demetris Zeinalipour <[log in to unmask]>
Reply-To:General discussion of Extensible Markup Language <[log in to unmask]>
Date:Sat, 19 Feb 2000 05:06:26 +0200
Content-Type:text/plain
Parts/Attachments:
Parts/Attachments

text/plain (63 lines)


Is it possible to append directly the Element <b> from XML2 to the <b>
Elements of XML1 and produce in that way XML1 (modified),
without involving <c/> of XML2 in this procedure [see EXAMPLES at the bottom
of the page]
Currently i do something inefficient, by doing the following steps
1) i create a new <b> element in XML1
2) i create a new <c> element in XML1
3) i get the value of the <c> element of XML2 and assign it to the created
<c> in XML1
4) i append the created <c> element to the created <b> element
5)  finally i append the created <b> element to the root element of XML1

What i want to do is to append directly a Element (that may contain
subelements) to another Element, something like
element1.appendChild(element2)  * where element1 represent  <a> of  XML1 and
elemenent2 represents a <b> element of XML2

* Notice that this would work if element2 was created from the same Document
as element1

Is this possible? .
I think that the same topic has been discussed some time ago but i can't
remeber what kind of answer were given then.
Note : Currently i am using Ibm's XML parser for java

I would appreciate any suggestions

Thank's
Demetris

EXAMPLES
------------
XML1
<a>
   <b>
       <c></c>
       <c></c>
   </b>
   <b>
       <c></c>
   </b>
</a>

XML2
<a>
   <b>
       <c></c>
   </b>
</a>

XML1 (modified)
<a>
   <b>
       <c></c>
       <c></c>
   </b>
   <b>
       <c></c>
   </b>
   <b>
      <c></c>
  </b>
</a>

Back to: Top of Message | Previous Page | Main XML-L Page

Permalink



LISTSERV.HEANET.IE

CataList Email List Search Powered by the LISTSERV Email List Manager