p2p.wrox.com Forums

p2p.wrox.com Forums (http://p2p.wrox.com/index.php)
-   Classic ASP XML (http://p2p.wrox.com/forumdisplay.php?f=69)
-   -   Please save my sanity (http://p2p.wrox.com/showthread.php?t=15485)

pbyers July 15th, 2004 11:04 AM

Please save my sanity
 
Good Afternoon All

    The two XML files shown below, contain the same data.

    I need to translate from one to the other (BOTH WAYS) in two ASP files.

    I can do this by the use of some rather cumbersome VBS.

    However, I seem to remember seeing an article somewhere showing how to do it using XSL (I think)

    I cant find the article sadly.



    I also would like to get some "generic"-ish script to do the job.


    Can anyone please either;

        point me to a resource that tells me how to do it;

    or

        give me some working scripts that would do the job.



    I thank you all in advance and anticipation - if you can help, you will save an old guy from 'going completely round the twist'.


Best regards
Thank you

Pete (Northolt UK)





<?xml version="1.0"?>
<HOTEL-STUFF>
    <ROOM-DETS>
      <ROOM-CODE VALUE="R40"/>
      <RESN-CODE>
       <RESN-REF VALUE="VR-407"/>
       <ARRIVAL-DATE VALUE="27/07/1998"/>
       <STAY-DAYS VALUE="2"/>
       <CLIENT-CODE VALUE="DAL00322"/>
       <CLIENT-NAME VALUE="Marzak"/>
      </RESN-CODE>
      <RESN-CODE>
       <RESN-REF VALUE="VR-417"/>
       <ARRIVAL-DATE VALUE="29/07/1998"/>
       <STAY-DAYS VALUE="14"/>
       <CLIENT-CODE VALUE="DAL00217"/>
       <CLIENT-NAME VALUE="Hathaway"/>
      </RESN-CODE>
      <RESN-CODE>
       <RESN-REF VALUE="VR-477"/>
       <ARRIVAL-DATE VALUE="27/07/2004"/>
       <STAY-DAYS VALUE="2"/>
       <CLIENT-CODE VALUE="DAL00322"/>
       <CLIENT-NAME VALUE="Marzak"/>
       <ROOM-FIXED VALUE="True"/>
      </RESN-CODE>
    </ROOM-DETS>
    <ROOM-DETS>
      <ROOM-CODE VALUE="R72"/>
      <RESN-CODE>
       <RESN-REF VALUE="VR-123"/>
       <ARRIVAL-DATE VALUE="27/07/1998"/>
       <STAY-DAYS VALUE="2"/>
       <CLIENT-CODE VALUE="XYZ00322"/>
       <CLIENT-NAME VALUE="Smith"/>
      </RESN-CODE>
    </ROOM-DETS>
</HOTEL-STUFF>





<?xml version="1.0"?>
<HOTEL-STUFF>
    <ROOM-DETS ROOM-CODE="R40" RESN-REF="VR-407" ARRIVAL-DATE="27/07/1998" STAY-DAYS="2" CLIENT-CODE="DAL00322" CLIENT-NAME="Marzak"/>
    <ROOM-DETS ROOM-CODE="R40" RESN-REF="VR-417" ARRIVAL-DATE="29/07/1998" STAY-DAYS="14" CLIENT-CODE="DAL00217" CLIENT-NAME="Hathaway"/>
    <ROOM-DETS ROOM-CODE="R40" RESN-REF="VR-477" ARRIVAL-DATE="27/07/2004" STAY-DAYS="2" CLIENT-CODE="DAL00322" CLIENT-NAME="Marzak" ROOM-FIXED="True"/>
    <ROOM-DETS ROOM-CODE="R72" RESN-REF="VR-123" ARRIVAL-DATE="27/07/1998" STAY-DAYS="2" CLIENT-CODE="XYZ00322" CLIENT-NAME="Smith"/>
</HOTEL-STUFF>


All times are GMT -4. The time now is 10:02 PM.

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.