[Last Call] Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

Read XML and input data into MySQL using Coldfusion

Posted on 2007-10-20
1
Medium Priority
?
643 Views
Last Modified: 2008-01-10
Hello,

Does anybody have any examples how to import or read xml with Coldfusion and input the data into a table using Coldfusion?

Thanks,

Brian
0
Comment
Question by:brihol44
1 Comment
 
LVL 12

Accepted Solution

by:
pigmentarts earned 2000 total points
ID: 20132467
reading xml...

 <cfscript>
  URLToPull  = "http://www.mydoamin.co.uk/feed.xml";
</cfscript>
 <cfhttp url="#URLToPull#" method="GET" timeout="15">
    </cfhttp>
    <cfscript>
  XMLContent = trim(cfhttp.filecontent);
  XMLContent = XMLParse(XMLContent);
</cfscript>

output to see what you have i.e. cfdum at this point, then loop via each one if you have lots of data i.e.

 <cfloop from="1" to="3"  index="idx">
        <cfoutput>
xml content here
        </cfoutput>
      </cfloop>

within the output you could then output into a table however you like

if you want an example on parsing xml here is a good link
http://tutorial195.easycfm.com/
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Hi, Even though I have created this Tutorial on My personal Blog, Some people might not able to find my website, So here i am posting it again Today, from the topic it is very clear that i will be showing you here the very basic usage of how we …
This is an updated version of a post made on my blog over 3 years ago. It is unfortunately, still very relevant as we continue to see both SQLi (SQL injection) and XSS (cross site scripting) attacks hitting some of the most recognizable website and …
Whether it be Exchange Server Crash Issues, Dirty Shutdown Errors or Failed to mount error, Stellar Phoenix Mailbox Exchange Recovery has always got your back. With the help of its easy to understand user interface and 3 simple steps recovery proced…
As many of you are aware about Scanpst.exe utility which is owned by Microsoft itself to repair inaccessible or damaged PST files, but the question is do you really think Scanpst.exe is capable to repair all sorts of PST related corruption issues?
Suggested Courses

831 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question