473,385 Members | 2,003 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,385 software developers and data experts.

how to use xsl to change this xml format

can i use xsl to change this format

Expand|Select|Wrap|Line Numbers
  1.   <rr n="Address">
  2.   <tt>
  3.   <j n="currentAddress">0</j> 
  4.   <j n="city">city</j> 
  5.   </tt>
  6.   </rr>
to this :-

Expand|Select|Wrap|Line Numbers
  1.   <Address>
  2.   <tt>
  3.   <currentAddress>0</currentAddress> 
  4.   <city>city</city> 
  5.   </tt>
  6.   <Address>
notice that i want the attribute value to become the element and remove the attribute if possible please post method.

thank you
Sep 19 '10 #1
1 1335
jkmyoung
2,057 Expert 2GB
Use braces to indicate attribute value templates:
Expand|Select|Wrap|Line Numbers
  1. <xs:template match="rr">
  2.   <xs:element name="{@n}">
  3.      <xsl:apply-templates/>
  4.    ...
  5. ...
  6.  
Sep 21 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: Raseliarison nirinA | last post by:
hi all, i found an unanswered question at http://www.faqts.com/knowledge_base/index.phtml/fid/538 with possible response below. i've tried to send it at faqt.python but can't figure out how to...
2
by: Ravi | last post by:
HI All, I am using Windows, Database territory = US Database code page = 1252 Database code set ...
6
by: Stuart McGraw | last post by:
I am looking for a VBA "format" or "template" function, that is, a function that takes a format string and a varying number of arguments, and substitutes the argument values into the format string...
1
by: Bonj | last post by:
Hi I have a datagrid control that I want to be able to change the source SQL statement for, I presume I can do this by setting the datasource property and calling DataBind(). But how can I change...
20
by: andreas | last post by:
When I copy a vb.net project using date formats from one PC with a windows date format f.e. dd/mm/yyyy to another PC having a format yy/mm/dd then I get errors. How can I change for a while in the...
0
by: Goosie | last post by:
Is it possible to change the format of a decimal field on mysql level? We would like to use an open source solution though all the currency fields have to change. Values like: 1,2567.34 should be...
1
by: Tee GEE | last post by:
I included my VBA below. I would like to change the font of the "strBody" to be Bold, italic, color, etc. The code that I attempted to write is identified by ***. Any help would be appreciated....
1
by: sonoo | last post by:
hi i m trying to change the format of DateTimePicker i wanna to set it into this format like"01/02/2006" plz help me
2
GrandMaster
by: GrandMaster | last post by:
Can I create an update query to change all the dates in a column of data that is currently in this format: 0407 (so the first two digits are the month and the third and fourth digits are the year,...
0
by: =?Utf-8?B?UGhpbCBKb2huc29u?= | last post by:
Hello, Is there any way to modify the format of the paging information at the bottom of an asp.net 2.0 gridview? I have tried the method at the following link, but that did not work for me,...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
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,...

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.