Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / Languages / C# / August 2007

Tip: Looking for answers? Try searching our database.

Change in XML format

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
ipramod@gmail.com - 23 Aug 2007 09:17 GMT
Hi,

I have an predefined XML format, lets say:

<employee id="1111">
      <name></name>
      <addr></addr>
      <salary></salary>
</employee>

Now if my XML format is changed then how do I convert my old XML to
new XML? Some tags are added in the XML tag of employee and some are
deleted, some are as it is. But the new format is also fixed and I
know that.

Is there any standard way like XSLT or any other way to convert them?
I dont want to manually change the XML tags. Do I have to parse each
node and check whether it is present in the new format or modify it
accordingly.

I just want the same data to be filled in as per my new XML format.

Please let us know if any coding standard is followed to the same.

Thanks,
Regards,
PI
Jon Skeet [C# MVP] - 23 Aug 2007 09:32 GMT
On Aug 23, 9:17 am, ipra...@gmail.com wrote:
> I have an predefined XML format, lets say:
>
[quoted text clipped - 10 lines]
>
> Is there any standard way like XSLT or any other way to convert them?

Yes, XSLT is basically the standard way of doing this.

> I dont want to manually change the XML tags. Do I have to parse each
> node and check whether it is present in the new format or modify it
> accordingly.

"Just" write an XSLT template and apply it to the old files.

I say "just" because I personally can't standard XSLT. However, it's
probably the most appropriate technology in this case. See
http://w3schools.com/xsl/default.asp

Jon

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.