XML to XML using XSLT - Community Credit Forums
in

    Community Credit Forums

XML to XML using XSLT

Last post Wed, Nov 22 2006 10:00 PM by MalindaNg. 1 replies.
Page 1 of 1 (2 items)
Sort Posts: Previous Next
  • Fri, Nov 10 2006 6:12 AM

    XML to XML using XSLT

    I am not sure how to put a tag based on some condition.

    Eg.  My input xml would look like:

     

    <root>

    <data>

    <Latitude>-37 47 32</Latitude>

    <Longitude>144 58 5</Longitude>

    <Direction></Direction>

    <Type>Blackspot</Type>

    <Speed> </Speed>

    </data>

    </root>

     

    In my output XML I want to add some tag based on if I have “Blackspot” as data under the tag <Type> in my input XML.

     

    Any suggestions on how it could be achieved.

  • Wed, Nov 22 2006 10:00 PM In reply to

    • MalindaNg
    • Top 75 Contributor
    • Joined on Fri, Nov 10 2006
    • Alabama, United States
    • Posts 10

    Re: XML to XML using XSLT

    Hi,

    Was this your question"Transforming XML TO XML using XSLT "? I am a Jr. XML level.   I need to transform one xml document into a second xml document. They both have many nodes so xslt works fine, but there is one node I have.   It seems to me I have to "Split" or "Parse" the FullAddress node by
    the "([at]" character, but HOW I do that in XSLT


    Node in Input File.

    |FullAddress|Malynda Nguyen([at]16714 SW10th Street
    ([at]Miramar([at]FL/33027([at]USA|/FullAddress|

    The Result should be:

    |Name|Malynda Nguyen|/Name|
    |Address|16714 SW10th Street|/Address|
    |City|Miramar|/City|
    |State|FL|/State|
    |ZipCode|33027|/ZipCode|
    |Country|USA|/Country|

    maybe some Guru from Community Credit will help us

Page 1 of 1 (2 items)
Powered by Community Server (Commercial Edition), by Telligent Systems