473,387 Members | 1,463 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Injecting a copy of a value using a xslt

I am using a xml with the following structure :

<xml ....>
<mainnode>
<node1>value1<node1>
<node2>
<subnode1>val</subnode1>
</node2>
<node3>value3</node3>
<node4>value4</value4>
</mainnode>

This xml i want to transform to

<xml ....>
<mainnode>
<node1>value1<node1>
<node2>
<subnode1>val</subnode1>
</node2>
<node3>value3</node3>
<NEWNODE>value1</NEWNODE>
<node4>value4</value4>
</mainnode>

where a newnode is created after a specific node (node3), and contains
the value of node1.
I am not a XSLT guru so i'm gonna need some help.
TIA

Otto Beragg

Jul 23 '07 #1
0 1542

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Patrik Carlsson | last post by:
I have a problem using Xerces with a template for a generic page-header getting a sub-tree as argument. The same stylesheet is working flawlessly in IE and Mozilla, though it would be nice to have...
3
by: Greg Jones | last post by:
Hello, This may be a simple question but difficult to search on since the keywords are so generic. Is there a way, in XSLT, to copy an embedded DTD from the source XML to the target XML?...
5
by: Nadav | last post by:
Hi, Introduction: ************************************************************ I am working on a project that should encrypt PE files ( Portable executable ), this require me to inject some...
17
by: Luke Matuszewski | last post by:
Hi ! Simple question (but thus it may appear no simple answer): If i putting a script onto the page i simply could inline it in <script> element or via its src attribute so (second way): <script...
4
by: volunteer | last post by:
SIMPLE VERSION OF THE QUESTION: XML_TO_COPY.XML <?xml version="1.0" encoding="UTF-8"?><?xml-stylesheet type="text/xsl" href="xsl_that_tries_to_copy_but_does_not_work.xsl"?> <fruits...
1
by: Kenny D | last post by:
Sample input XML... <Publication> <FilingMetadata> <Id>38EA51240E6643208DB1B6D52F779A82</Id> <Cycle>BC</Cycle> </FilingMetadata> <PublicationComponent Role="Main" MediaType="Text">...
14
by: ofiras | last post by:
Hii everyone, I'm a web programmer, but I never understood sql injecting. All I found was that you can write "a' or 'a'='a" in the password field to try to connect without knowing the password. I...
6
by: kluge.wolfram | last post by:
Hi, i get stucked on a transformation problem using XSLT. What i need is to copy an XML Tree to an output XML without any automatic changes. Since i used <xsl:copyor <xsl:copy-ofthere occur...
4
by: mskichu | last post by:
hi, I have a xml in which I want to replace the element(s) value with XSLT Xml message <Message> <case> <party1> <!-- there are other elements -->
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.