473,388 Members | 923 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,388 software developers and data experts.

SAX character expansion

The following piece of code
$string = "<root><node>&#xA9;</node></root>";

$xp = xml_parser_create( 'ISO-8859-1' );

xml_set_element_handler( $xp, 'sh', 'eh' );
xml_set_character_data_handler( $xp, 'cd' );

xml_parser_set_option( $xp, XML_OPTION_CASE_FOLDING, false );
xml_parser_set_option( $xp, XML_OPTION_TARGET_ENCODING, 'ISO-8859-1' );

function sh( $p, $el, $at ) {
print '<'.$el.'>';

function eh( $p, $el ) {
print '</'.$el.'>';

function cd( $p, $data ) {
print $data;

xml_parse( $xp, $string );

Will give this output when executed whith PHP 5.0.3


The replacing of &#xA9; with is something I want to disable. Does anybody
has a solution for this?

Thanks in advance
Rutger Claes
Rutger Claes rg*@rgc.tld
Replace tld with top level domain of belgium to contact me pgp:0x3B7D6BD6
Do not reply to the from address. It's read by /dev/null and sa-learn only

Jul 17 '05 #1
0 1099

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

Similar topics

by: Caleb Hattingh | last post by:
Hi Here is a script I want to be able to write (explanation appears after): *** start of script *** import MyCustomMacroLib # This does the magic I would like help for. # This is not...
by: bill | last post by:
Consider the following: import os, commands os.environ="string with foo" a = '$QWE ${QWE/foo/baz}' b = commands.getoutput('echo ' + a) This does what I want, which is to expand a...
by: The Bicycling Guitarist | last post by:
A browser conforming to HTML 4.0 is required to recognize &#number; notations. If I use XHTML 1.0 and charset UTF-8 though, does &eacute; have as much support as é ? Sometimes when I run...
by: Robert Phan | last post by:
I was modified the expansions.xml to learn about expansion snippet. Now I got error when trying to invoke the expansion. Error is "No expansion template were found...". Do I needed to reinstall...
by: forest demon | last post by:
i've been trying to create a code snippet that would contain a special character...i.e. a trademark symbol (). but to no avail. whether in the CDATA section or a literal definition, no workie!...
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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,...
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,...
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

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.