[PHP-I18N] [Q] for PHP4.0 + DOM XML function using From: ±èµ¿Ç (kimdh <email protected>)
Date: 08/14/00

HI?

First I'm sorry.
I have a problem Using PHP4.0 + libxml2.2.2 (DOM XML function) with xml doc.
Because I don't have any references, I don't know what to do.
Could you help me?

I'm a Korean.

I want to use Korean langage XML doc.
I love to managing that xml doc with PHP4.0 + DOM XML function.

I succeeded in using PHP4.0+DOM XML function with English XML Doc.
But I have a problem using PHP4.0+DOM XML function with Korean XML Doc.

When Element name is Korean or PCDATA is Korean or ATTLIST is Korean ,
Using PHP4.0 + DOM XML function displayed &#xx character within Korean Language.

There is no error libxml2.2.2 by author of libxml2.2.2.
What shall i do ?

--------------------------------------------------------------------------------
 
Source Like this:
<html>
<head></head>
<body bgcolor="#ffffff">
<pre>
<?
$doc = new_xmldoc("1.0");
$root = $doc->add_root("questions");
$root->setattr("version","1");

$one = $root->new_child("Áú¹®µé","");
$one->setattr("Áú¹®¹øÈ£","1");
$one->new_child("³»¿ë","libxml-2.0.0 ? À» ¾î¶»°Ô ¾ò³ª¿ä?");
$one->new_child("answer","You can download the latest release of libxml either as a source archive o
r RPM package from http://xmlsoft.org/. The current version is libxml2-2.2.1.");

$two = $root->new_child("question","");
$two->setattr("number","2");
$two->new_child("text","2. how to configure PHP4 ?");
$two->new_child("answer","DIR is the libxml install directory (if you just use --with-dom it defaul
ts to /usr), I needed to use --with-dom=/usr/local");

$three = $root->new_child("question","");
$three->setattr("number","3");
$three->new_child("text","3. how to use DOM XML function ?");
$three->new_child("answer","Read this document source for a simple example.");

print(htmlspecialchars($doc->dumpmem()));
?>
</pre>
</body>
</html>


--------------------------------------------------------------------------------

Display Like this in IE5.0 :
<?xml version="1.0"?>
<questions version="1">
<Áú¹®µé Áú¹®¹øÈ£="1">
<³»¿ë>libxml-2.0.0 ? &#x3B; &#190;¾î¶»°Ô ¾ò³ª¿ä?</³»¿ë>
<answer>You can download the latest release of libxml either as a source archive or RPM package from http://xmlsoft.org/. The current version is libxml2-2.2.1.</answer>
</Áú¹®µé>
<question number="2">
<text>2. how to configure PHP4 ?</text>
<answer>DIR is the libxml install directory (if you just use --with-dom it defaults to /usr), I needed to use --with-dom=/usr/local</answer>
</question>
<question number="3">
<text>3. how to use DOM XML function ?</text>
<answer>Read this document source for a simple example.</answer>
</question>
</questions>


--------------------------------------------------------------------------------

Thanks .