473,394 Members | 1,960 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,394 software developers and data experts.

Format XML Nodes

Hi,

I have xml look like following

<ContactInformation>
<ContactName>
<Name>
<Person>
<LastName NewValue="Shepherd">
</LastName>
<FirstName NewValue="Bob">
</FirstName>
</Person>
</Name>
</ContactName>
<Phone>
<PhoneType NewValue="FAX">
</PhoneType>
<PhoneFormatted>
<PhoneAreaCode NewValue="461">
</PhoneAreaCode>
<PhonePrefix NewValue="641">
</PhonePrefix>
<PhoneSuffix NewValue="5026">
</PhoneSuffix>
</PhoneFormatted>
</Phone>
</ContactInformation>

I would like to format it in following way..

<ContactInformation>
<ContactName>
<Name>
<Person>
<LastName NewValue="Shepherd"/>
<FirstName NewValue="Bob"/>
</Person>
</Name>
</ContactName>
<Phone>
<PhoneType NewValue="FAX"/>
<PhoneFormatted>
<PhoneAreaCode NewValue="461"/>
<PhonePrefix NewValue="641"/>
<PhoneSuffix NewValue="5026"/>
</PhoneFormatted>
</Phone>
</ContactInformation>

How do i do it...is it possible in XSL?
Nov 12 '05 #1
1 967
Linesh Gajera wrote:
How do i do it...is it possible in XSL?

Probably, but I'd say that just wasting CPU and memory, because both
documents are equivalent ones.
--
Oleg Tkachenko
XML Insider
http://www.tkachenko.com/blog

Nov 12 '05 #2

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

Similar topics

1
by: Phil Price | last post by:
Hi there, I'm developing a shape recognition application for the tablet PC for a) fun b) university project. Currently I'm working on the learning stage using neural networks, and have to store...
10
by: .Net_Newbie | last post by:
Hello, gurus I have a problem about format XML I use ms data access building block to get a data set from stored procedure. the dataset's save xml give me data with the elements. Is there any...
2
by: Greg | last post by:
Hi. I have a rather large xml document (object) that can have one or more nodes with a certain attribute throughout (at ANY depth, not at the same level necessarily). I need to find this...
3
by: LC | last post by:
Hello all, Ive been using the treeview and for testing purpose i have created 2 Parent Nodes and 5 child nodes within each parent node i.e.- CN = Child Node Parent Node - CN - CN - CN
1
by: Woof | last post by:
Hi, I'm populating the nodes of a Tree View control via an SQL database, with the lowest child nodes (leaves from now on) Text field being set to a lengthy set of HTML. The outcome is a...
1
by: GTARDIO | last post by:
Hello, I use vb 6.0 to create an xml file. I use the microsoft XML V.5.0 reference. After I create nodes, attributes etc. I use lDOMDoc.save "c:\temp\example.xml" and the xml file is saved in...
3
by: elidrix | last post by:
Hi Its sounds very easy and its probably is..if someone can help me here.. i am trying to format products into 3 columns per row but when i want to filter the nodes based on a text search...
10
by: John Rogers | last post by:
This code only counts the parent nodes or rootnodes in a treeview, how do you count all the nodes in a treeview? // one way int NodeCounter = 0; foreach (TreeNode currentNode in...
3
by: Adam Powell | last post by:
Hi! I have seemingly simple problem, which no doubt someone out there has already solved, but I'm stumped. Imagine I have a dictionary like below, in which the keys are parent nodes and the values...
0
by: santoshsri | last post by:
Please have a look at below code snippet - in the first snippet I have made constant to provide a static format to string.. the second uses the constant to string.format the values received at...
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:
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...
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: 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
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...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.