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

How to dynamically SAVE Recordset as XML?

Guest
Apr 20, 2007 Apr 20, 2007

Copy link to clipboard

Copied

Does anyone know how to SAVE an exported recordset as a xml file on the server? (php MySQL)

I'm using the developer toolbox to 'export recordset as XML' and it loads the xml data dynamically, but it's slow. I'm hoping that there is a way i could have the xml file generated and saved on the server so that i dont' have to query the database every time.

I saw this article on how to do it, but i can't get it to work with the 'export recordset' feature
http://articles.techrepublic.com.com/5100-3513_11-6141415.html

any help is appreciated.
TOPICS
Server side applications

Views

660
Translate

Report

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
LEGEND ,
Apr 21, 2007 Apr 21, 2007

Copy link to clipboard

Copied

dz101 wrote:
> Does anyone know how to SAVE an exported recordset as a xml file on the server?
> (php MySQL)
>
> I'm using the developer toolbox to 'export recordset as XML' and it loads the
> xml data dynamically, but it's slow. I'm hoping that there is a way i could
> have the xml file generated and saved on the server so that i dont' have to
> query the database every time.

A very simple way of doing it is to load the PHP file that generates the
XML into a browser. Right-click and view the source code. Select the
source, copy it, and paste it into a new file. Save it as XML.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

Let me clarify. Yes, i know that it can be done manually by saving the souce code as an xml file. What i'm looking for is a way for the XML file to be autimatically written to the server rather than dynamically generated because it seems to be painfully slow that way.

I know that in the previous versions of the InterAKT XML extenstion, there was an option to save xml as a file, but that seems to be gone in the Adobe version.

I'm trying to set up some Spry data that lists upcoming events and associated images. I'd like to be able to update that info in a database and have a new XML file generated upon update. That way, I could feed a static XML file into the spry regions rather than having to do an XML transformation request each time the page is requested.

Again, the XML transfomration is EXTREMELY slower than calling a static XML file, but i don't want to have to manually generate the XML file everytime i upate the database.

Votes

Translate

Report

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
LEGEND ,
Apr 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

dz101 wrote:
> What i'm looking for is a way for the XML file to be
> autimatically written to the server rather than dynamically generated because
> it seems to be painfully slow that way.

If you find the dynamic generation to be painfully slow, it suggests
there's something wrong with your server.

If you want to write it to a file, it's simply a question of generating
a recordset, using a loop to generate the XML and save it to a string,
and finally using PHP to write the string to a file. It's a relatively
trivial procedure for anyone with intermediate PHP skills. However, I
don't know of an off-the-shelf way of automating it for you. Sorry.

--
David Powers, Adobe Community Expert
Author, "Foundation PHP for Dreamweaver 8" (friends of ED)
Author, "PHP Solutions" (friends of ED)
http://foundationphp.com/

Votes

Translate

Report

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 23, 2007 Apr 23, 2007

Copy link to clipboard

Copied

LATEST
thanks for your feedback. Unfortunately, it's a bit over my head to write the php code to convert the string to a file, which is pretty much the reason i use Dreamweaver so that i won't have to write PHP if at all possible. i'm just a visual type and don't really have the brain for programming.

in terms of a server issue, i've experimented with a few different processes to acheive the same results.
1. i've created a php page to generate a recordset directly from the database. this is very fast, but unfortunately i can't work with spry objects this way since it requires an XML string
2. i've createt the page using the spry framework calling a static XML file. this too is very fast (but requres me to manually save an XML file everytime I update the DB
3. I've used the XML transformation command from the Dreamweaver Developer Toolbox in conjunciton with the Spry recordset and this very, very slow in comparison to the previous methods.

I'm not an Apache expert, but i really dont' think it's a server issue. it seems that it is just a slower process to transform a db request into an xml string and output to a page. but, maybe i'm wrong. I've tested it on a few different servers and i've also run it under MAMP pro default config (php 5, MySQL 5) and still a slower process.

by the way, i have your book on PHP web development with dreamweaver. great book! really learned a lot.

Votes

Translate

Report

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