XML Transform to 1 XML file to another XML File

Hello All

 I am a novice programmer. I want to transform 1 xml file to another xml file.

I am looking for a example code where user will select source xml file and create another xml file in different file with different fields with some default validation of parsing date and default values.

 Can anyone help me or let me know any available source code in C#/ASP.Net?

 Ms Disha

12/3/2008 7:04:47 PM
asp.net.xml-datasource 7181 articles. 0 followers. Follow

2 Replies

Similar Articles

[PageSpeed] 19

I am assuming you know xslt, if not, you would have to go look at that.  But if you do, then this document will help you out


Chris Dupuy

Sr. Developer

Blue Cross/Blue Shield LA

* Please remember to click Mark as Answer on this post if it helped you *
12/4/2008 12:43:38 AM


    You can you XSLT for transforming from one XML to another XML.

For more info on XSLT you can refer following url (lots of examples):


You can use following C# code for applying XSL to XML to get another xml:

                // New way from .Net 2.0 onwards
                // Load the style sheet.
                XslCompiledTransform xslt = new XslCompiledTransform();

                // Execute the transform and output the results to a file.
                xslt.Transform("books.xml", "result.xml");

If this post was useful to you, please mark it as answer. Thank you!
12/4/2008 7:50:21 AM

Similar Artilces:

transform one xml file into xml file with another format?
 I want to transform one xml file into xml file with another format, can I use xslt to realize it? Please give me one good sample.Thanks. Hi, Yes you can use xsl to do this. See this article http://www.w3schools.com/XML/xml_xsl.asp for more information. In the artile the xsl transforms xml into html. similarly you can transform xml to another format xml using xsl  Please mark post as answer if it helped youMy Blog...

Replace a node from 1 xml file with a node from another xml file
Hi,  suppose i have these 2 xml files: File 1: <resultset morerecords="0" paging-cookie="1">accountid last="{D14D44AD-36D0-DC11-AA32-0003FF33509E}" first="{D14D44AD-36D0-DC11-AA32-0003FF33509E}" /></cookie>"> <result> ... <donotpostalmail name="Allow">0</donotpostalmail> <name>Adventure Works</name> <primarycontactid name="Abhijit Thakur" dsc="0" yomi="Abhijit Thakur">{0820590A-37D0-DC11-AA32-0003FF33509E}</primarycontactid>...

Create an XML file from another XML file
I am using VS 2005 with C#.  I would like to create/generate an xml file from another XML with a differnt structure.  Basically, I want to create the actual xml file for my users whenever they raise my web service method. This is the actual structure of my xml i would like to create the following <Education>  <mydata>    <year>1988 - 1995</year>    <reward>High School Diploma</reward>    <school>Miami Secondary</school>  </mydata>  ...</Education> The original ...

Need help in making xsl file to transform My given xml file to my needed xml file
 want's to need help in creating an xsl file to transform My current xml file data which is following <NewDataSet> <Table> <Title>MyFirstTitle</Title> <ExtraColumn1>2007-01-12T10:14:00+05:00</ExtraColumn1> <BookNumber>1181013</BookNumber> <CompanyName>TestComany1</CompanyName> <ZipCode>91006</ZipCode> <City>Arcadia</City> <State>CA</State> <Country>US</Country> <Description>TestDescription1</Description> <ExtraColumn2>See Book Description</ExtraCo...

Microsoft Chart control for .NET Framework about state management and serialization problem, it works OK with one XML file but fails with another XML file
I use Microsoft Chart control for .NET Framework , you can see details at http://blogs.msdn.com/alexgor/archive/2008/10/27/microsoft-chart-control-for-net-framework-released.aspx The Chart1 is load data from a xml and save to ViewStateData, so even if after I click Reload button, the chart1 still display OK! I'm very strange that the chart1 works well after click Reload button if it's loaded from Chart1.Serializer.Load(HttpContext.Current.Server.MapPath("~/Template/1.xml"));but chart1 don't display fter click Reload button if it's loaded from Chart1.Serializer.Loa...

After download a xml file, why my xml file has been changed?
Protected Sub Button2_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button2.Click        Dim fileName As String = Server.MapPath("~/Products.xml")        Response.Clear()         Response.ContentType = "text/xml"        Response.AddHeader("Content-Disposition", "attachment; filename=" & fileName)                Response.WriteFile(fileName)  ...

How to write a xml file to another computer using path like this \\Server5\XML\XMLTest.xml?
Hi Guys,How can I write a xml file that read from a dataset to another computer in our network?something like this path "\\Server5\XML\XMLTest.xml"I am using below code to write xml file.----------------------------------------            // create a file name to write to.            string filename = "\\Server5\XML\XMLTest.xml";            // create the FileStream to write with.        &nb...

How can i add a xml file to an other xml file?
such as i have a xml file : <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item1> an other one is: <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> i wanted is: <item1> <item2> <item3>aaa</item3> <item4>bbb</item4> </item2> <item2> <item3>ccc</item3> <item4>ddd</item4> <item2> <item1> thanks. You ca...

Splitting XML file to different XML files
hi,I have xml file that represent a table , one of the element(column) of the xml represent category..I want to split the xml file to different xml files base on the categories (each xml file will represent different category).The question is , if it posible to split the original xml using one xslt file, or i must create different xslt file for each category?thanks in advance one xslt for each output.You can also do this with XmlDocument and save it to two seaprate paths.HTHRegards,Rob...

Load XMl file and read xml file
How do I load and read nodes from the xml file in c#.??? ThankYou Sample code: http://www.kirupa.com/net/reading_xml_directly_pg1.htmJack Yang.NET Developer Here is how you read xml file and loop and display nodesXmlDocument xDoc = new XmlDocument();xDoc.Load(xmlPath); foreach(XmlNode node in xDoc.SelectNodes("//nodeName you want to display")){Response.Write("name: " + node.Attributes["name"].InnerText + " value: " + node.Attributes["value"].InnerText);}...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

submitting an XMl file to a server, saving it as an XML file and reposting it to another url
I apologize in posting this - I kept looking in the forums but could' nt find a parallel - please point me in the right direction. 1. I need to upload an XML file to a server ( This is sort of complete) The code that has been used is <% Set xmlDoc = CreateObject("Msxml2.DOMDocument.5.0") Set xmlHTTP = CreateObject("MSXML2.ServerXMLHTTP.5.0") xmlDoc.validateOnParse = True xmlDoc.async = False xmlDoc.load("C:\Inetpub\wwwroot\test\PO.XML") xmlHTTP.open ("POST", "http://www.something.com/OrderRequest.aspx", False) xmlHTTP.send(x...

Using the ID from 1 XML to get the Name in another XML-file
Hi I have 2 XML-files, to be exact commingsoon.xml and film_desc.xml. These XML-Files look like this. commingsoon.xml- <comingsoon>- <day DATE="2006-04-19">  <couf ID="9043" />   <couf ID="24656" />   <couf ID="24662" />   <couf ID="24668" />   <couf ID="25159" />   <couf ID="25774" />   <couf ID="25781" />   <couf ID="25829" />   </day>- <day DATE="2006-04-26">  <couf ID="21213" />   <couf ID="23956" />   <couf ID="24224" />   <couf ...

Web resources about - XML Transform to 1 XML file to another XML File - asp.net.xml-datasource

Fourier transform - Wikipedia, the free encyclopedia
The Fourier transform , named for Joseph Fourier , is a mathematical transform with many applications in physics and engineering . Very commonly, ...

Amir Arjomand-A Regime Facing a Legitimacy Crisis Will Transform Dialogue Over a Drying Lake Into A Matter ...
Banooye Sabz hat eine Notiz mit dem Titel Amir Arjomand-A Regime Facing a Legitimacy Crisis Will Transform Dialogue Over a Drying Lake Into A ...

➚ Trevor sez, "Friday and Saturday night, design collective The Mission Business transforms Toronto's ...
Trevor sez, "Friday and Saturday night, design collective The Mission Business transforms Toronto's Evergreen Brick Works into an end of the ...

Fred Wilson: The Three Trends That Will Transform our World
Paris – Mobile, big data... these are just technologies and when you're trying to imagine "the next 10 years", that's too small a lens to look ...

Voicy Helium Voice Changer Recorder - Transform and change your video.s into funny chipmunk effects on ...
Get Voicy Helium Voice Changer Recorder - Transform and change your video.s into funny chipmunk effects on the App Store. See screenshots and ...

It's time to turn on and transform Civic
A new agenda will be set for the transformation of the city centre.

Model Pixee Fox has ribs removed to transform into real-life Jessica Rabbit
AN ASPIRING model has spent nearly $170,000 on plastic surgeries — including having six ribs taken out — in an effort to transform herself into ...

New agenda calls for action to transform Canberra's struggling CBD
... a big screen in Garema Place, enlivening laneways and developing population density targets among a sweep of measures proposed to transform ...

How Agencies Must Transform for a New Generation of Clients
... past is exactly what makes them vulnerable now? What if the next generation of client doesn't want to foot the bill of dismantling and transforming ...

GM transforms soldiers into service techs
Auto dealer service and fixed operations issues.

Resources last updated: 12/11/2015 3:57:31 AM