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

Problem with XML built manually from recordset, please help.

Guest
Oct 14, 2009 Oct 14, 2009

Hi,

I have built XML manually from a recordset as instructed in David Powers book The Essential Guide to Dreamweaver CS3, page 703.

I have also used phpmyadmin to generate XML, page 696. I have attached both pages to this message.

When I tested wedding_manual.php in the browser, it wouldn't display, I just got a white screen. I have checked my php error logs, I get the message displayed below:

PHP parse error: syntax error, unexpected T_STRING in Applications/MAMP/htdocs/mywesite/mywebpage.php on line 43.

I have checked the code on line 43, it's where the XML declaration sits, I can't see anything wrong with the syntax. I deleted it a typed it in again, but there still seems to be a problem. I have also checked my code against japan_manual.php in examples/ch20, and again I cannot see where the problem is, could somebody please help me with this.

Thankyou.

TOPICS
Server side applications
510
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
Enthusiast ,
Oct 14, 2009 Oct 14, 2009

If your server has short tags enabled in PHP, then it's recognizing the <?----?> in your XML declaration as PHP opening/closing tags, and of course running into a syntax error since what it's finding isn't PHP. The easiest way around that is usually to wrap the XML declaration inside PHP print or echo statements, so it's not processed as PHP. For instance, convert this:

<?xml version="1.0" encoding="utf-8"?>

...to something like:

<?php print('<?xml version="1.0" encoding="utf-8"?>'); ?>

(if the forum renders that OK...)

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
Advisor ,
Oct 14, 2009 Oct 14, 2009
LATEST

http://labs.adobe.com/technologies/spry/samples/utils/query2xml.html

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