mirror of
https://github.com/sigmasternchen/php-doc-en
synced 2025-03-16 00:48:54 +00:00
more CDATA fixes
git-svn-id: https://svn.php.net/repository/phpdoc/en/trunk@63122 c90b9560-bf6c-de11-be94-00142212c4b1
This commit is contained in:
parent
1dbef32688
commit
535c21f790
1 changed files with 6 additions and 6 deletions
|
@ -1,5 +1,5 @@
|
|||
<?xml version="1.0" encoding="iso-8859-1"?>
|
||||
<!-- $Revision: 1.21 $ -->
|
||||
<!-- $Revision: 1.22 $ -->
|
||||
<reference id="ref.xml">
|
||||
<title>XML parser functions</title>
|
||||
<titleabbrev>XML</titleabbrev>
|
||||
|
@ -1669,7 +1669,7 @@ $xml_parser->parse("<A ID=\"hallo\">PHP</A>");
|
|||
<informalexample>
|
||||
<programlisting role="php">
|
||||
<![CDATA[
|
||||
$simple = "<para><note>simple note</note></para>";
|
||||
$simple = "<para><note>simple note</note></para>";
|
||||
$p = xml_parser_create();
|
||||
xml_parse_into_struct($p,$simple,$vals,$index);
|
||||
xml_parser_free($p);
|
||||
|
@ -1788,7 +1788,7 @@ class AminoAcid {
|
|||
|
||||
function readDatabase($filename) {
|
||||
// read the xml database of aminoacids
|
||||
$data = implode("",file($filename));
|
||||
$data = implode("",file($filename));
|
||||
$parser = xml_parser_create();
|
||||
xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
|
||||
xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,1);
|
||||
|
@ -1797,7 +1797,7 @@ function readDatabase($filename) {
|
|||
|
||||
// loop through the structures
|
||||
foreach ($tags as $key=>$val) {
|
||||
if ($key == "molecule") {
|
||||
if ($key == "molecule") {
|
||||
$molranges = $val;
|
||||
// each contiguous pair of array entries are the
|
||||
// lower and upper range for each molecule definition
|
||||
|
@ -1815,11 +1815,11 @@ function readDatabase($filename) {
|
|||
|
||||
function parseMol($mvalues) {
|
||||
for ($i=0; $i < count($mvalues); $i++)
|
||||
$mol[$mvalues[$i]["tag"]] = $mvalues[$i]["value"];
|
||||
$mol[$mvalues[$i]["tag"]] = $mvalues[$i]["value"];
|
||||
return new AminoAcid($mol);
|
||||
}
|
||||
|
||||
$db = readDatabase("moldb.xml");
|
||||
$db = readDatabase("moldb.xml");
|
||||
echo "** Database of AminoAcid objects:\n";
|
||||
print_r($db);
|
||||
|
||||
|
|
Loading…
Reference in a new issue