i looking through link
https://pragmaticintegrator.wordpress.com/2012/10/28/transforming-xml-to-csv-via-xslt/
which details translating xml csv using xslt task need do, can't figure out how relates data set looks this:
<?xml version="1.0" encoding="utf-8"?> <data> <step name="getdatafromdatabase" at="2017-03-21t17:56:59.9384367-04:00"> <result> <r firm_id_from_source="1" firm_name="the place" full_address="123 south main ste 123
los angeles, ca 90071" postal_code="90071" country="united states" phone_number="213-555-1212" is_active="1" dealer_type="friend" /> <r firm_id_from_source="2" firm_name="the other place" full_address="456 central ave ste 456
beverly hills, ca 90210" postal_code="90210" country="united states" phone_number="213-555-1213" is_active="1" dealer_type="buddy" /> <r firm_id_from_source="3" firm_name="the 3rd place" full_address="123 north main ste 789
los angeles, ca 90072" postal_code="90072" country="united states" phone_number="213-555-1214" is_active="1" dealer_type="friend" /> </result></step></data>
the problem here data stored attributes instead of child nodes. can iterate on nodes <xsl:for-each select="@*">
selecting attributes name difficult in xslt, you'd have count on records having same attributes in same order.
Comments
Post a Comment