|
-
Oct 7th, 2005, 11:43 PM
#1
Thread Starter
New Member
Need advise on transforming XML
I have an XML file created from a crystal reports export. The file uses a schema that is giving me a fit trying to parse the elements. I have tried transforming with a stylesheet but now I am wondering if it would be better to create a script. I am not experienced enough to script it from scratch. Below is a snip of the XML file. I want to display the data contained in FormattedValue in a table as an include in an existing webpage. I also need to change the order the data appears in the table. Any help is greatly appreciated.
<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type='text/xsl' ?>
<FormattedReport xmlns = 'urn:crystal-reports:schemas' xmlns:xsi = 'http://www.w3.org/2000/10/XMLSchema-instance'
>
<FormattedAreaPair Level="0" Type="Report">
<FormattedArea Type="Header">
<FormattedSections>
<FormattedSection SectionNumber="0">
<FormattedReportObjects>
</FormattedReportObjects>
</FormattedSection>
</FormattedSections>
</FormattedArea>
<FormattedAreaPair Level="1" Type="Group">
<FormattedArea Type="Footer">
<FormattedSections>
<FormattedSection SectionNumber="0">
<FormattedReportObjects>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="Sum ({@Price_1}, {initm.description})"><ObjectName>Field9</ObjectName>
<FormattedValue>$11.25</FormattedValue>
<Value>11.25</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="Sum ({@Price_10}, {initm.description})"><ObjectName>Field10</ObjectName>
<FormattedValue>$10.50</FormattedValue>
<Value>10.50</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="Sum ({@Price_50}, {initm.description})"><ObjectName>Field11</ObjectName>
<FormattedValue>$10.00</FormattedValue>
<Value>10.00</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{initm.description}"><ObjectName>Field12</ObjectName>
<FormattedValue>ABELIA EDWARD GOUCHER #3</FormattedValue>
<Value>ABELIA EDWARD GOUCHER #3</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:decimal" FieldName="{@Available}"><ObjectName>Field13</ObjectName>
<FormattedValue>51</FormattedValue>
<Value>51.00</Value>
</FormattedReportObject>
<FormattedReportObject xsi:type="CTFormattedField" Type="xsd:string" FieldName="{inprd.common}"><ObjectName>Field14</ObjectName>
<FormattedValue>PURPLE-PINK ABELIA</FormattedValue>
<Value>PURPLE-PINK ABELIA</Value>
</FormattedReportObject>
</FormattedReportObjects>
</FormattedSection>
</FormattedSections>
</FormattedArea>
</FormattedAreaPair>
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|