Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

How can I format the XML file that was uploaded to the website using ColdFusion and read from it?

New Here ,
Apr 19, 2010 Apr 19, 2010

Hi,

I've uploaded the xml file to the website and read using

               <cffile action="upload" filefield="myfile" destination="#expandpath('./')#" nameconflict="overwrite">
               <cfset myXMLDocument=XmlParse("#expandpath('./')##CFFILE.serverfile#")>
               <cfdump var="#myXMLDocument#">

but my assigment needs me to edit the field and format it before I show the content on the website.

Eg: I got the price, and the quantity column from the xml...then i need to calculate the total price(price*quantity) and display

as Price, Quantity and Total Price on the website.

Is there a way that I could do that? So far I am stuck after reading the raw xml file and displaying the raw data only

Help would be really appreciated.

Thank you all.

277
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Guest
Apr 19, 2010 Apr 19, 2010
LATEST

Use dot notation to drill down into an xml file. For example rss.channel.item.name.firstname.xmltext.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources