473,802 Members | 2,031 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Short Tags and XML

I have heard that you cannot use short tags and XML because of the opening
line of an xml document...

<?xml version="1.0"?>

Consider this:

<<?= '?'; ?>xml version="1.0"<? = '?'; ?>>

Problem Solved.

Best Regards,
Jason Garber
IonZoft, Inc.
Jul 16 '05 #1
1 9942

"Jason G." <jason_NOSPAM@N OSPAM_ionzoft.c om> a écrit dans le message news:
vh************@ corp.supernews. com...
I have heard that you cannot use short tags and XML because of the opening
line of an xml document...

<?xml version="1.0"?>

Consider this:

<<?= '?'; ?>xml version="1.0"<? = '?'; ?>>

Problem Solved.


and if your php.ini has short_open_tags =off, and you can't modify it ? (for
example, an administrator very strict who doesn't allow you to modify
anything on the server...). The best way, IMHO, to resolve this problem is
to never use short open tag. Thus, it will always work.

Best regards,
Philippe
Jul 16 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

7
7110
by: varois83 | last post by:
Hi I am fairly new to PHP/mysql and was reading an online tutorial and learned that my short tags weren't enabled. At this time I have no need for them, my setup apache/mysql/php runs on my PC just to test code. Shall I enable short tags or not? Windows XP pro PHP 4
1
2405
by: Hans Gruber | last post by:
Hi all, Here`s a problem I have been working on for a while, but can`t seem to solve satisfactory. I have a database with blog entries. Because each of those entries has a variable length which can be quite long, I want to build an overview page. Of each entry there will be a preview version, say 700 characters max. My problem has to do with HTML tags. If for example an entry contains a
24
3555
by: Day Bird Loft | last post by:
Web Authoring | Meta-Tags The first thing to understand in regard to Meta Tags is the three most important tags placed in the head of your html documents. They are the title, description, and keyword meta-tags. If you are missing any of these meta-tags you are missing the boat. If you use the following meta-tag formula, and you are not trying to deceive the spiders, I guarantee you will succeed in increasing your placement in the...
2
1541
by: nospam | last post by:
I'm trying to do a transform on some xml using the XslTransform class. The input xml contains an empty element in short format like this... <element attrib="abc"/> But during the transform it's being converted to the longer form like this... <element attrib="abc"></element>
7
1501
by: mmarlow | last post by:
Hi all, I wish I knew if this was even a PHP problem or not! It's probably Internet Explorer but here goes anyway... Random pages at random times don't appear correctly in IE6, the HTML is actually cut short at seemingly random points (it's very random, you know). It could be at any character on any line. This is usually displayed simply as a background with no content, but viewing the source actually shows quite a lot, although sometimes...
8
5675
by: comp.lang.php | last post by:
I installed WAMP5 on my WinXP box which works just fine on its own, and I found a practical way of handling my short-tag PHP script via .htaccess: php_flag short_open_tag on To ensure my literally hundreds of PHP scripts will all function within the WAMP5 architecture. However, there is a case of a series of installer scripts written in
2
4209
by: varois83 | last post by:
Hi I am just starting with PHP. I am reading a PHP 5 book and they say to not use short tags and to actually disable them so I see an error message if I don't form my tags correctly. "short_open_tag" is currently set to "on", shall I set it to "off"? I am not planning on using short tags. Thanks a lot
4
3675
by: Sony89 | last post by:
Hi guys. How can you enable short tags in your browser?
2
2439
mikek12004
by: mikek12004 | last post by:
Initialy i wanted to create a short description of a text to be shown as preview, I found the following which worked OK $length = 35; // The number of words you want $words = explode(' ', $b_keimeno); // Creates an array of words $true_length=count($words); //to see if description smaller than $length $words = array_slice($words, 0, $length); $s_keimeno = implode(' ', $words); if ($true_length>$length) $s_keimeno.="...";
0
9699
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9562
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10536
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10304
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9114
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5622
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4270
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3792
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.