phpxd-commits Mailing List for phpXD (Page 5)
Status: Beta
Brought to you by:
growbal
You can subscribe to this list here.
| 2001 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(6) |
Jul
(4) |
Aug
|
Sep
(1) |
Oct
|
Nov
(14) |
Dec
(2) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2002 |
Jan
(49) |
Feb
(43) |
Mar
(15) |
Apr
|
May
|
Jun
(10) |
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
(1) |
Dec
|
|
From: Thomas D. <th...@us...> - 2002-01-26 17:07:28
|
Update of /cvsroot/phpxd/phpXD.www/data In directory usw-pr-cvs1:/tmp/cvs-serv20404/data Log Message: Directory /cvsroot/phpxd/phpXD.www/data added to the repository |
|
From: Thomas D. <th...@us...> - 2002-01-26 17:07:28
|
Update of /cvsroot/phpxd/phpXD.www/classes In directory usw-pr-cvs1:/tmp/cvs-serv20404/classes Log Message: Directory /cvsroot/phpxd/phpXD.www/classes added to the repository |
|
From: Thomas D. <th...@us...> - 2002-01-26 17:00:51
|
Update of /cvsroot/phpxd/phpXD.www In directory usw-pr-cvs1:/tmp/cvs-serv19097 Log Message: Status: Vendor Tag: vendor Release Tags: start No conflicts created by this import ***** Bogus filespec: - ***** Bogus filespec: Imported ***** Bogus filespec: sources |
|
From: Thomas D. <th...@us...> - 2002-01-26 13:20:06
|
Update of /cvsroot/phpxd/phpXD/samples
In directory usw-pr-cvs1:/tmp/cvs-serv12482/samples
Modified Files:
sample.php sample.xml
Log Message:
Just started the implementation of a DTD parser.
Index: sample.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/samples/sample.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** sample.php 2002/01/25 22:31:28 1.1
--- sample.php 2002/01/26 13:20:01 1.2
***************
*** 15,19 ****
* @version $Revision$
*/
! require("phpXD.php");
function echoTree(&$dom, $deep = 0) {
--- 15,19 ----
* @version $Revision$
*/
! require("../phpXD.php");
function echoTree(&$dom, $deep = 0) {
***************
*** 153,157 ****
$parser = new DOMParser();
! //echoTree($parser->parseFile("sample.xml"));
! echoTree($parser->parse("<?xml version=\"1.0\"?><hallo>Thomas</hallo>"));
?>
--- 153,157 ----
$parser = new DOMParser();
! echoTree($parser->parseFile("sample.xml"));
! /*echoTree($parser->parse("<?xml version=\"1.0\"?><hallo>Thomas</hallo>"));*/
?>
Index: sample.xml
===================================================================
RCS file: /cvsroot/phpxd/phpXD/samples/sample.xml,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** sample.xml 2002/01/25 22:31:28 1.1
--- sample.xml 2002/01/26 13:20:01 1.2
***************
*** 1,15 ****
! <?xml version="1.0"?>
! <hello>
! This is a phpXD sample dokument.
! Here are some sample XML features.
! <a_child>
! Hello World.
! </a_child>
! <an_empty_child />
! <!-- This is a comment... -->
! <![CDATA[ ... and this a CDATA-Section ... ]]>
! <?php
! // ... and this a Processing-Instruction
! echo "PHP is cool";
! ?>
! </hello>
--- 1,16 ----
! <?xml version="1.0"?>
! <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "DTD/xhtml1-strict.dtd">
! <hello>
! This is a phpXD sample dokument.
! Here are some sample XML features.
! <a_child>
! Hello World.
! </a_child>
! <an_empty_child />
! <!-- This is a comment... -->
! <![CDATA[ ... and this a CDATA-Section ... ]]>
! <?php
! // ... and this a Processing-Instruction
! echo "PHP is cool";
! ?>
! </hello>
\ No newline at end of file
|
|
From: Thomas D. <th...@us...> - 2002-01-26 13:20:06
|
Update of /cvsroot/phpxd/phpXD/include/parser
In directory usw-pr-cvs1:/tmp/cvs-serv12482/include/parser
Modified Files:
DOMParser.php
Added Files:
DTDParser.php
Log Message:
Just started the implementation of a DTD parser.
--- NEW FILE: DTDParser.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DTDParser.php,v 1.1 2002/01/26 13:20:01 thomi Exp $
/**
* Parse a dtd. EXPERIMENTAL!
*
* @package DTDParser
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class DTDParser {
var $parseDTD = false;
var $parameterEntities;
function parse($str) {
if (!empty($str)) {
while (preg_match('=(.*)\%([a-z,A-Z,0-9,\.]*);(.*)$=sU', $str, $ent)) {
$str = preg_replace('=<!--.*-->=sU', '', $str);
while (preg_match('=(.*)<!ENTITY[ ,\n,\r,\t]*\%[ ,\n,\r,\t]*([a-z,A-Z,0-9,\.]*)[ ,\n,\r,\t]*PUBLIC[ ,\n,\r,\t]*"([a-z,A-Z,0-9,\-,/, ]*)"[ ,\n,\r,\t]*"([a-z,A-Z,0-9,\.,\-,_,/]*)"[ ,\n,\r,\t]*>(.*)$=sU', $str, $ent)) {
if ($this->file_exists($this->currentDir."/".$ent[4])) {
$this->parameterEntities[$ent[2]] =
preg_replace('=<!--.*-->=sU', '',
implode("", file($this->currentDir."/".$ent[4])));
}
$str = $ent[1].$ent[5];
}
while (preg_match('=(.*)<!ENTITY[ ,\n,\r,\t]*\%[ ,\n,\r,\t]*([a-z,A-Z,0-9,\.]*)[ ,\n,\r,\t]*"(.*)"[ ,\n,\r,\t]*>(.*)$=sU', $str, $ent)) {
$this->parameterEntities[$ent[2]] = $ent[3];
$str = $ent[1].$ent[4];
}
while (preg_match('=(.*)\%([a-z,A-Z,0-9,\.]*);(.*)$=sU', $str, $ent)) {
$str = $ent[1].$this->parameterEntities[$ent[2]].$ent[3];
}
}
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_set_object($parser, $this);
// parse only the dtd
xml_set_default_handler($parser, "handleDefault");
// xml_set_unparsed_entity_decl_handler($parser,
// "handleUnparsedEntityDecl");
// xml_set_external_entity_ref_handler($parser, "handleExternalEntityRef");
if (!xml_parse($parser, $str, true)) {
$this->displayError("XML error in line %d column %d: %s",
xml_get_current_line_number($parser),
xml_get_current_column_number($parser),
xml_error_string(xml_get_error_code($parser)));
}
xml_parser_free($parser);
}
else {
$this->displayError("The string is empty.");
}
}
function parseFile($filename) {
if ($this->file_exists($filename)) {
$path = explode("/", $filename);
if (count($path) > 0) {
unset($path[count($path) - 1]);
$this->currentDir = implode("/", $path);
}
$content = implode("", file($filename));
$content = "<!DOCTYPE null [".$content."]><null />";
return $this->parse($content);
}
else {
$this->displayError("File %s could not be found or read.", $filename);
}
}
function parseTokens($tokens) {
// assert: tokens are all valid
$this->parseDoctype($tokens);
}
function parseDoctype($tokens) {
$token = $tokens[0];
if ($this->compareToken($token, "<!DOCTYPE")) {
$this->parseDocumentElement(array_slice($tokens, 1));
}
}
function parseDocumentElement($tokens) {
$token = $tokens[0];
$this->documentElement = $token;
$token = $tokens[1];
if ($this->compareToken($token, "[")) {
$this->parseInternalDTD(array_slice($tokens, 2));
}
if ($this->compareToken($token, "SYSTEM")) {
$this->parseExternalSystemDTD(array_slice($tokens, 2));
}
if ($this->compareToken($token, "PUBLIC")) {
$this->parseExternalPublicDTD(array_slice($tokens, 2));
}
}
function parseInternalDTD($tokens) {
}
function parseExternalSystemDTD($tokens) {
}
function parseExternalPublicDTD($tokens) {
$tokenPublicID = $this->removeQuotes($tokens[0]);
$tokenURI = $this->removeQuotes($tokens[1]);
switch ($tokenPublicID) {
case "-//W3C//DTD XHTML 1.0 Strict//EN": {
$DTDParser = new DTDParser();
// $DTDParser->parseFile("http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd");
$DTDParser->parseFile("../xhtml1-strict.dtd");
break;
}
}
// echo $tokenURI;
}
function compareToken($tok1, $tok2) {
if ($tok1 == $tok2) {
return true;
}
else {
return false;
}
}
function removeQuotes($str) {
if (($str[0] == "\"") && ($str[strlen($str) - 1] == "\"")) {
return substr($str, 1, strlen($str) - 2);
}
return $str;
}
function handleDefault($parser, $data) {
$data = trim($data);
// echo "<pre>".$data."</pre>";
if ($data == "<!DOCTYPE") {
$this->DTDTokens[] = $data;
$this->parseDTD = true;
return true;
}
if ($this->parseDTD) {
$this->DTDTokens[] = $data;
if ($data == "[") {
$this->parseInternalDTD = true;
}
if ($data == "]") {
$this->parseInternalDTD = false;
}
if (($data == ">") && (!$this->parseInternalDTD)) {
$this->parseDTD = false;
$this->parseTokens($this->DTDTokens);
}
return true;
}
}
function handleExternalEntityRef($parser, $openEntityNames, $base, $systemId, $publicId) {
echo "hier";
return true;
}
function handleUnparsedEntityDecl($parser, $entityName, $base, $systemId, $publicId, $notationName) {
echo "hier";
return true;
}
function file_exists($filename) {
$file = @fopen($filename, "r");
if (!$file) {
return false;
}
return true;
}
/**
* Displays errors, which occur while parsing.
*
* @private
* @returns void
*/
function displayError($message) {
if (func_num_args() > 1) {
$arguments = func_get_args();
$command = "\$message = sprintf(\$message, ";
for ($i = 1; $i < sizeof($arguments); $i++ ) {
$command .= "\$arguments[".$i."], ";
}
$command = eregi_replace(", $", ");", $command);
eval($command);
}
echo "<strong>phpXD error:</strong> ".$message;
exit;
}
}
Index: DOMParser.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/include/parser/DOMParser.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** DOMParser.php 2002/01/25 22:29:26 1.2
--- DOMParser.php 2002/01/26 13:20:01 1.3
***************
*** 50,76 ****
/**
! * The parsed DTD string. Only valid while parsing a XML file!
*
* @private
! * @type string
*/
! var $parsedDTD = false;
!
/**
! * The parsed DTD is an internal DTD. Only valid while parsing
! * a XML file!
*
* @private
! * @type boolean
*/
! var $parsedDTDInternal = false;
/**
! * A array with the defined namespaces.
! *
! * @private
! * @type array
*/
! var $namespaces = false;
/**
--- 50,74 ----
/**
! * A array with the defined namespaces.
*
* @private
! * @type array
*/
! var $namespaces = false;
!
/**
! * The DTD is parsed.
*
* @private
! * @type string
*/
! var $parseDTD = false;
! var $parseInternalDTD = false;
/**
! * ****TODO****
*/
! var $DTDParser = null;
! var $DTDTokens = "";
/**
***************
*** 97,123 ****
if (!empty($content)) {
! $this->document = new Document();
!
! $parser = xml_parser_create();
!
! xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
!
! xml_set_object($parser, $this);
!
! xml_set_element_handler($parser, "handleStartElement",
! "handleEndElement");
! xml_set_character_data_handler($parser, "handleCharacterData");
! xml_set_processing_instruction_handler($parser,
! "handleProcessingInstruction");
! xml_set_default_handler($parser, "handleDefault");
!
! if (!xml_parse($parser, $content, true)) {
! $this->displayError("XML error in file %s, line %d: %s",
! $file, xml_get_current_line_number($parser),
! xml_error_string(xml_get_error_code($parser)));
! }
!
! xml_parser_free($parser);
! return $this->document;
}
}
--- 95,99 ----
if (!empty($content)) {
! return $this->parse($content);
}
}
***************
*** 137,140 ****
--- 113,117 ----
if (!empty($str)) {
$this->document = new Document();
+ $this->DTDParser = new DTDParser();
$parser = xml_parser_create();
***************
*** 150,156 ****
"handleProcessingInstruction");
xml_set_default_handler($parser, "handleDefault");
if (!xml_parse($parser, $str, true)) {
! $this->displayError("XML error in XML-String, line %d: %s",
xml_get_current_line_number($parser),
xml_error_string(xml_get_error_code($parser)));
--- 127,134 ----
"handleProcessingInstruction");
xml_set_default_handler($parser, "handleDefault");
+ xml_set_external_entity_ref_handler($parser, "handleExternalEntityRef");
if (!xml_parse($parser, $str, true)) {
! $this->displayError("XML error in line %d: %s",
xml_get_current_line_number($parser),
xml_error_string(xml_get_error_code($parser)));
***************
*** 194,198 ****
if (!(strpos($name, ":") === false)) {
$newChild =& $this->document->createElementNS($namespace, $name);
!
if ($newChild == NAME_SPACE_ERR) {
$this->displayError("XML error: namespace not valid in line %d.",
--- 172,176 ----
if (!(strpos($name, ":") === false)) {
$newChild =& $this->document->createElementNS($namespace, $name);
!
if ($newChild == NAME_SPACE_ERR) {
$this->displayError("XML error: namespace not valid in line %d.",
***************
*** 320,375 ****
/**
! * The DTD Handler. Expat has no DTD Handler callback, so this
! * is set by handleDefault.
*
* @private
* @returns void
*/
! function handleDTD($parser, $data) {
$data = trim($data);
!
! if (!empty($data)) {
! $this->parsedDTD .= " ".$data;
! }
! if ($data == "[") {
! $this->parseDTDInternal = true;
! }
! if ($data == "]") {
! $this->parseDTDInternal = false;
}
- if ((substr($this->parsedDTD, strlen($this->parsedDTD)-1) == ">") &&
- !$this->parseDTDInternal) {
- $this->document->doctype = new DocumentType();
-
- // this is just a hack to differ between internal and external DTDs
- $DTD = explode(" ", $this->parsedDTD);
! $this->document->doctype->name = $DTD[1];
! if ($DTD[2] == "SYSTEM") {
! $this->document->doctype->systemId = $DTD[3];
! }
! else {
! if ($DTD[2] == "PUBLIC") {
! $this->document->doctype->publicId = $DTD[3];
! $this->document->doctype->systemId = $DTD[4];
! }
! else {
! $this->document->doctype->internalSubset = $this->parsedDTD;
! }
}
! xml_set_default_handler($parser, "handleDefault");
return true;
}
- }
! /**
! * The Default Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleDefault($parser, $data) {
! $data = trim($data);
if (!(strpos($data, "<!--") === false)) {
--- 298,341 ----
/**
! * The Default Handler for Expat.
*
* @private
* @returns void
*/
! function handleDefault($parser, $data) {
$data = trim($data);
!
! if ($data == "<!DOCTYPE") {
! $this->DTDTokens[] = $data;
! $this->parseDTD = true;
! return true;
}
! if ($this->parseDTD) {
! if ($data != "") {
! $this->DTDTokens[] = $data;
! }
! if ($data == "[") {
! $this->parseInternalDTD = true;
! }
! if ($data == "]") {
! $this->parseInternalDTD = false;
! }
! if (($data == ">") && (!$this->parseInternalDTD)) {
! $this->parseDTD = false;
! // $this->DTDParser->parseTokens($this->DTDTokens);
}
+ return true;
+ }
! if ($data == "<![CDATA[") {
! $this->parseCData = true;
return true;
}
! if ($data == "]]>" && $this->parseCData) {
! $this->parseCData = false;
! return true;
! }
if (!(strpos($data, "<!--") === false)) {
***************
*** 387,409 ****
}
- if ($data == "<![CDATA[") {
- $this->parseCData = true;
- return true;
- }
-
- if ($data == "]]>" && $this->parseCData) {
- $this->parseCData = false;
- return true;
- }
-
- if ($data == "<!DOCTYPE") {
- $this->parsedDTD .= $data;
- xml_set_default_handler($parser, "handleDTD");
- return true;
- }
-
return false;
}
/**
* Displays errors, which occur while parsing.
--- 353,363 ----
}
return false;
}
+ function handleExternalEntityRef($parser, $openEntityNames, $base, $systemId, $publicId) {
+ return true;
+ }
+
/**
* Displays errors, which occur while parsing.
***************
*** 430,434 ****
exit;
}
-
}
?>
--- 384,387 ----
|
|
From: Thomas D. <th...@us...> - 2002-01-26 13:20:05
|
Update of /cvsroot/phpxd/phpXD/include In directory usw-pr-cvs1:/tmp/cvs-serv12482/include Added Files: dom.php parser.php Log Message: Just started the implementation of a DTD parser. --- NEW FILE: dom.php --- <?php // phpXD - a XML DOM Implementation // // This Software and all associated files are released unter the // GNU Public License (GPL), see LICENSE for details. // // $Id: dom.php,v 1.1 2002/01/26 13:20:00 thomi Exp $ require($path."include/dom/Node.php"); require($path."include/dom/Attr.php"); require($path."include/dom/CharacterData.php"); require($path."include/dom/Comment.php"); require($path."include/dom/Document.php"); require($path."include/dom/DocumentFragment.php"); require($path."include/dom/DocumentType.php"); require($path."include/dom/DOMException.php"); require($path."include/dom/DOMImplementation.php"); require($path."include/dom/Element.php"); require($path."include/dom/Entity.php"); require($path."include/dom/EntityReference.php"); require($path."include/dom/NamedNodeMap.php"); require($path."include/dom/NodeList.php"); require($path."include/dom/ProcessingInstruction.php"); require($path."include/dom/Text.php"); require($path."include/dom/CDataSection.php"); ?> --- NEW FILE: parser.php --- <?php // phpXD - a XML DOM Implementation // // This Software and all associated files are released unter the // GNU Public License (GPL), see LICENSE for details. // // $Id: parser.php,v 1.1 2002/01/26 13:20:01 thomi Exp $ require($path."include/parser/DOMParser.php"); require($path."include/parser/DTDParser.php"); ?> |
|
From: Thomas D. <th...@us...> - 2002-01-26 13:20:05
|
Update of /cvsroot/phpxd/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv12482 Modified Files: phpXD.php Log Message: Just started the implementation of a DTD parser. Index: phpXD.php =================================================================== RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v retrieving revision 1.24 retrieving revision 1.25 diff -C2 -r1.24 -r1.25 *** phpXD.php 2002/01/25 22:18:18 1.24 --- phpXD.php 2002/01/26 13:20:00 1.25 *************** *** 7,29 **** // $Id$ ! $path = ""; ! require($path."include/dom/Node.php"); ! require($path."include/dom/Attr.php"); ! require($path."include/dom/CharacterData.php"); ! require($path."include/dom/Comment.php"); ! require($path."include/dom/Document.php"); ! require($path."include/dom/DocumentFragment.php"); ! require($path."include/dom/DocumentType.php"); ! require($path."include/dom/DOMException.php"); ! require($path."include/dom/DOMImplementation.php"); ! require($path."include/dom/Element.php"); ! require($path."include/dom/Entity.php"); ! require($path."include/dom/EntityReference.php"); ! require($path."include/dom/NamedNodeMap.php"); ! require($path."include/dom/NodeList.php"); ! require($path."include/dom/ProcessingInstruction.php"); ! require($path."include/dom/Text.php"); ! require($path."include/dom/CDataSection.php"); ! require($path."include/parser/DOMParser.php"); ! ?> \ No newline at end of file --- 7,13 ---- // $Id$ ! $path = "."; ! require($path."include/dom.php"); ! require($path."include/parser.php"); ! ?> |
|
From: Thomas D. <th...@us...> - 2002-01-26 13:20:05
|
Update of /cvsroot/phpxd/phpXD/include/dom
In directory usw-pr-cvs1:/tmp/cvs-serv12482/include/dom
Modified Files:
Node.php
Log Message:
Just started the implementation of a DTD parser.
Index: Node.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/include/dom/Node.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** Node.php 2002/01/25 22:18:18 1.1
--- Node.php 2002/01/26 13:20:01 1.2
***************
*** 167,171 ****
* @type Document
*/
! var $ownerDocument;
/**
--- 167,171 ----
* @type Document
*/
! var $ownerDocument = null;
/**
***************
*** 896,900 ****
*/
function checkDocument(&$child) {
! if (empty($child->ownerDocument)) {
return 0;
}
--- 896,900 ----
*/
function checkDocument(&$child) {
! if (($child->ownerDocument == null)) {
return 0;
}
|
|
From: Thomas D. <th...@us...> - 2002-01-25 22:31:30
|
Update of /cvsroot/phpxd/phpXD/samples
In directory usw-pr-cvs1:/tmp/cvs-serv16366/samples
Added Files:
sample.php sample.xml
Log Message:
Samples moved from / to /samples.
--- NEW FILE: sample.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: sample.php,v 1.1 2002/01/25 22:31:28 thomi Exp $
/**
* Sample PHP script for testing phpXD. Loads the file sample.xml and
* prints it as HTML.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
require("phpXD.php");
function echoTree(&$dom, $deep = 0) {
$space = "";
for ($i = 0; $i < $deep; $i++) $space .= " ";
if ($dom->nodeType == CDATA_SECTION_NODE) {
echo $space;
echo "<span style=\"color:#990000\">";
echo "<![CDATA[";
$output = htmlspecialchars($dom->getData());
if (!(strpos($output, "\n") === false)) {
$break = "<br />";
}
else {
$break = "";
$space = "";
}
echo $break.$space;
$output = str_replace(" ", " ", $output);
$output = str_replace("\n", "<br />".$space, $output);
$output = str_replace("\t", " ", $output);
echo $output;
echo $break.$space;
echo "]]><br />";
echo "</span>";
}
if ($dom->nodeType == COMMENT_NODE) {
echo $space;
echo "<span style=\"color:#009900\">";
echo "<!--";
$output = htmlspecialchars($dom->getData());
if (!(strpos($output, "\n") === false)) {
$break = "<br />";
}
else {
$break = "";
$space = "";
}
echo $break.$space;
$output = str_replace(" ", " ", $output);
$output = str_replace("\n", "<br />".$space, $output);
$output = str_replace("\t", " ", $output);
echo $output;
echo $break.$space;
echo "--><br />";
echo "</span>";
}
if ($dom->nodeType == DOCUMENT_NODE) {
echo "<pre>";
if (!empty($dom->doctype)) {
if (!empty($dom->doctype->publicId) && !empty($dom->doctype->systemId)) {
echo "<!DOCTYPE ".$dom->doctype->name." PUBLIC ".
$dom->doctype->systemId." ".$dom->doctype->publicId.">\n";
}
else {
if (!empty($dom->doctype->systemId)) {
echo "<!DOCTYPE ".$dom->doctype->name." SYSTEM ".
$dom->doctype->systemId.">\n";
}
else {
$output = $dom->doctype->internalSubset;
$output = str_replace("<", "<", $output);
$output = str_replace(" > ", "><br />", $output);
$output = str_replace("[ ", "[<br />", $output);
$output = str_replace("\n", "<br />", $output);
echo $output."<br />";
}
}
}
if ($dom->hasChildNodes()) {
echoTree($dom->firstChild, $deep);
}
echoTree($dom->documentElement);
echo "</pre>";
}
if ($dom->nodeType == DOCUMENT_FRAGMENT_NODE) {
echoTree($dom->firstChild);
}
if ($dom->nodeType == ELEMENT_NODE) {
echo $space;
echo "<span style=\"color:#000099\">";
echo "<".$dom->tagName;
if (isset($dom->attributes)) {
for ($i = 0; $i < $dom->attributes->getLength(); $i++) {
$elem =& $dom->attributes->item($i);
echo " ".$elem->getName()."=\"".$elem->getValue()."\"";
}
}
if ($dom->hasChildNodes()) {
echo "><br />";
echo "</span>";
echoTree($dom->firstChild, $deep+4);
echo $space;
echo "<span style=\"color:#000099\">";
echo "</".$dom->tagName."><br />";
echo "</span>";
}
else {
echo " /><br />";
echo "</span>";
}
}
if ($dom->nodeType == TEXT_NODE) {
if (trim($dom->getData()) != "") {
echo $space;
}
echo htmlspecialchars(trim($dom->getData()));
if (trim($dom->getData()) != "") {
echo "<br />";
}
}
if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) {
echo $space;
echo "<span style=\"color:#990099\">";
echo "<?".$dom->getTarget()." ";
$output = htmlspecialchars($dom->getData());
$output = trim($output);
$output = str_replace(" ", " ", $output);
$output = str_replace("\t", " ", $output);
if (!(strpos($output, "\n")) === false) {
$output = "<br />".$space.$output."<br />".$space;
$output = str_replace("\n", "<br />".$space, $output);
echo $output;
echo "?><br />";
}
else {
echo $output;
echo " ?><br />";
}
echo "</span>";
}
if (isset($dom->nextSibling)) {
echoTree($dom->nextSibling, $deep);
}
}
$parser = new DOMParser();
//echoTree($parser->parseFile("sample.xml"));
echoTree($parser->parse("<?xml version=\"1.0\"?><hallo>Thomas</hallo>"));
?>
--- NEW FILE: sample.xml ---
<?xml version="1.0"?>
<hello>
This is a phpXD sample dokument.
Here are some sample XML features.
<a_child>
Hello World.
</a_child>
<an_empty_child />
<!-- This is a comment... -->
<![CDATA[ ... and this a CDATA-Section ... ]]>
<?php
// ... and this a Processing-Instruction
echo "PHP is cool";
?>
</hello>
|
|
From: Thomas D. <th...@us...> - 2002-01-25 22:31:30
|
Update of /cvsroot/phpxd/phpXD In directory usw-pr-cvs1:/tmp/cvs-serv16366 Removed Files: sample.php sample.xml Log Message: Samples moved from / to /samples. --- sample.php DELETED --- --- sample.xml DELETED --- |
|
From: Thomas D. <th...@us...> - 2002-01-25 22:30:39
|
Update of /cvsroot/phpxd/phpXD/samples In directory usw-pr-cvs1:/tmp/cvs-serv16209/samples Log Message: Directory /cvsroot/phpxd/phpXD/samples added to the repository |
|
From: Thomas D. <th...@us...> - 2002-01-25 22:29:29
|
Update of /cvsroot/phpxd/phpXD/include/parser
In directory usw-pr-cvs1:/tmp/cvs-serv15665/include/parser
Modified Files:
DOMParser.php
Log Message:
Added function to parse strings.
Index: DOMParser.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/include/parser/DOMParser.php,v
retrieving revision 1.1
retrieving revision 1.2
diff -C2 -r1.1 -r1.2
*** DOMParser.php 2002/01/25 22:18:18 1.1
--- DOMParser.php 2002/01/25 22:29:26 1.2
***************
*** 126,129 ****
--- 126,167 ----
}
}
+
+ /**
+ * Loads XML string specified by $str and creates the DOM tree.
+ *
+ * @public
+ * @param $str <code>string</code>
+ * @returns phpXD
+ */
+ function parse($str) {
+ if (!empty($str)) {
+ $this->document = new Document();
+
+ $parser = xml_parser_create();
+
+ xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
+
+ xml_set_object($parser, $this);
+
+ xml_set_element_handler($parser, "handleStartElement",
+ "handleEndElement");
+ xml_set_character_data_handler($parser, "handleCharacterData");
+ xml_set_processing_instruction_handler($parser,
+ "handleProcessingInstruction");
+ xml_set_default_handler($parser, "handleDefault");
+
+ if (!xml_parse($parser, $str, true)) {
+ $this->displayError("XML error in XML-String, line %d: %s",
+ xml_get_current_line_number($parser),
+ xml_error_string(xml_get_error_code($parser)));
+ }
+
+ xml_parser_free($parser);
+ return $this->document;
+ }
+ else {
+ $this->displayError("The string is empty.");
+ }
+ }
/**
|
|
From: Thomas D. <th...@us...> - 2002-01-25 22:18:21
|
Update of /cvsroot/phpxd/phpXD/include/dom
In directory usw-pr-cvs1:/tmp/cvs-serv12964/include/dom
Added Files:
Attr.php CDataSection.php CharacterData.php Comment.php
DOMException.php DOMImplementation.php Document.php
DocumentFragment.php DocumentType.php Element.php Entity.php
EntityReference.php NamedNodeMap.php Node.php NodeList.php
ProcessingInstruction.php Text.php
Log Message:
--- NEW FILE: Attr.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Attr.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM Attr interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Attr extends Node {
/**
* The name of the attribute.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $name;
/**
* A link to the Element object that owns this attribute.<br>
* DOM-Level 2
*
* @private
* @type Node
*/
var $ownerElement;
/**
* If this attribute was explicity set in the XML source for the parent
* element or it is a default value in the DTD (currently not supported by
* phpXD) specified is true.<br>
* DOM-Level 1
*
* @private
* @type boolean
*/
var $specified;
/**
* The value of the attribute.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $value;
/**
* Constructor of the class.
*
* @public
*/
function Attr() {
Node::Node();
$this->nodeType = ATTRIBUTE_NODE;
$this->specified = true;
$this->name =& $this->nodeName;
}
/**
* Returns the name of the attribute.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getName() {
return $this->name;
}
/**
* Returns a reference to the owner of the attribute.<br>
* DOM-Level 2
*
* @public
* @returns Node
*/
function &getOwnerElement() {
return $this->ownerElement;
}
/**
* Returns true if the attribute was set explicity in the XML Source or in
* the DTD (not supported).<br>
* DOM-Level 1
*
* @public
* @returns boolean
*/
function getSpecified() {
return $this->specified;
}
/**
* Return the value of the attribute.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getValue() {
if (isset($this->value)) {
return $this->value;
}
}
/**
* Sets the value of the attribute<br>
* DOM-Level 1
*
* @public
* @param $value <code>string</code>
* @returns void
*/
function setValue($value) {
if (isset($this->childNodes)) {
$child =& $this->firstChild;
while (isset($child)) {
removeChild($child);
$child =& $this->firstChild;
}
}
$new = new Text();
$new->nodeValue = $value;
$new->ownerDocument =& $this->ownerDocument;
$this->firstChild =& $new;
$this->lastChild =& $this->firstChild;
$this->nodeValue =& $this->firstChild->nodeValue;
$this->value =& $this->nodeValue;
}
/**
* Sets the value of the attribute (inherited function from Node interface)
* <br>DOM-Level 1
*
* @public
* @param $nodeValue <code>string</code>
* @returns void
*/
function setNodeValue($nodeValue) {
$this->setValue($nodeValue);
}
/**
* This inherited function from Node interface is not supported by the Attr
* interface.<br>
* DOM-Level 1
*
* @public
* @returns NOT_SUPPORTED_ERR
*/
function &appendChild(&$newChild) {
return NOT_SUPPORTED_ERR;
}
/**
* This inherited function from Node interface is not supported by the Attr
* interface.<br>
* DOM-Level 1
*
* @public
* @returns NOT_SUPPORTED_ERR
*/
function &insertBefore(&$newChild, &$refChild) {
return NOT_SUPPORTED_ERR;
}
/**
* This inherited function from Node interface is not supported by the Attr
* interface.<br>
* DOM-Level 1
*
* @public
* @returns NOT_SUPPORTED_ERR
*/
function &replaceChild($newChild, $oldChild) {
return NOT_SUPPORTED_ERR;
}
}
?>
--- NEW FILE: CDataSection.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: CDataSection.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM CDataSection interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class CDataSection extends Text {
/**
* Constructor of the class.
*
* @public
*/
function CDataSection() {
Text::Text();
$this->nodeType = CDATA_SECTION_NODE;
$this->nodeName = "#cdata-section";
}
}
?>
--- NEW FILE: CharacterData.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: CharacterData.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM CharacterData interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class CharacterData extends Node {
/**
* The "raw" data of the CharacterData node.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $data;
/**
* The size of the string stored in data.<br>
* DOM-Level 1
*
* @private
* @type int
*/
var $length;
/**
* Constructor of the class.
*
* @public
*/
function CharacterData() {
Node::Node();
$this->data =& $this->nodeValue;
}
/**
* Returns the data stored in this node.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getData() {
return $this->data;
}
/**
* Sets the data stored in this node.<br>
* DOM-Level 1
*
* @public
* @param $data <code>string</code>
* @returns string
*/
function setData($data) {
$this->nodeValue = $data;
}
/**
* Returns the length of the data stored in this node.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getLength() {
return strlen($this->data);
}
/**
* Appends contents of the arg parameter to the current contents of the data
* attribute.<br>
* DOM-Level 1
*
* @public
* @param $arg <code>string</code>
* @returns string
*/
function appendData($arg) {
$this->nodeValue .= $arg;
}
/**
* Truncates the data attribute; It removes count characters, starting at
* the offset position.<br>
* DOM-Level 1
*
* @public
* @param $offset <code>int</code>
* @param $count <code>int</code>
* @returns string
*/
function deleteData($offset, $count) {
$this->nodeValue = substr($this->nodeValue, 0, $offset-1).
substr($this->nodeValue, $offset+count);
}
/**
* Takes a string, splits the data attributes current contents at the given
* offset, then inserts the string arg between the two substrings.<br>
* DOM-Level 1
*
* @public
* @param $offset <code>int</code>
* @param $arg <code>string</code>
* @returns string
*/
function insertData($offset, $arg) {
$this->nodeValue = substr($this->nodeValue, 0, $offset-1).$arg.
substr($this->nodeValue, $offset);
}
/**
* Replaces a substring within the data attribute with another string.<br>
* DOM-Level 1
*
* @public
* @param $offset <code>int</code>
* @param $count <code>int</code>
* @param $arg <code>string</code>
* @returns string
*/
function replaceData($offset, $count, $arg) {
if ($offset + $count > strlen($this->nodeValue)) {
$count = strlen($this->nodeValue) - $offset;
}
$this->nodeValue = substr($this->nodeValue, 0, $offset-1).
substr($arg, 0, $count) . substr($this->nodeValue, $offset+$count);
}
/**
* Returns a string that contains a subset of the string stored in the data
* attribute.<br>
* DOM-Level 1
*
* @public
* @param $offset <code>int</code>
* @param $count <code>int</code>
* @returns string
*/
function substringData($offset, $count) {
return substr($this->nodeValue, $offset, $count);
}
}
?>
--- NEW FILE: Comment.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Comment.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM Comment interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Comment extends CharacterData {
/**
* Constructor of the class.
*
* @public
*/
function Comment() {
CharacterData::CharacterData();
$this->nodeName = "#comment";
$this->nodeType = COMMENT_NODE;
}
}
?>
--- NEW FILE: DOMException.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DOMException.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Because PHP4 doesn't support exceptions, only the ExceptionCodes are
* defined. The Functions which normally would like to raise a exception,
* returns one of this ExceptionCodes.
* Currently not all ExceptionsCodes are used, only NOT_SUPPORTED_ERR is
* really often returned. ;=)
*/
/**
* If index or size is negative, or greater than the allowed value.<br>
* DOM-Level 1
*
* @const INDEX_SIZE_ERR
*/
define("INDEX_SIZE_ERR", 1);
/**
* If the specified range of text does not fit into a DOMString.<br>
* DOM-Level 1
*
* @const DOMSTRING_SIZE_ERR
*/
define("DOMSTRING_SIZE_ERR", 2);
/**
* If any node is inserted somewhere it doesn't belong.<br>
* DOM-Level 1
*
* @const HIERARCHY_REQUEST_ERR
*/
define("HIERARCHY_REQUEST_ERR", 3);
/**
* If a node is used in a different document than the one
* that created it (that doesn't support it).<br>
* DOM-Level 1
*
* @const WRONG_DOCUMENT_ERR
*/
define("WRONG_DOCUMENT_ERR", 4);
/**
* If an invalid or illegal character is specified, such as in a name. <br>
* DOM-Level 1
*
* @const INVALID_CHARACTER_ERR
*/
define("INVALID_CHARACTER_ERR", 5);
/**
* If data is specified for a node which does not support data.<br>
* DOM-Level 1
*
* @const NO_DATA_ALLOWED_ERR
*/
define("NO_DATA_ALLOWED_ERR", 6);
/**
* If an attempt is made to modify an object where modifications
* are not allowed.<br>
* DOM-Level 1
*
* @const NO_MODIFICATION_ALLOWED_ERR
*/
define("NO_MODIFICATION_ALLOWED_ERR", 7);
/**
* If an attempt is made to reference a node in a context where
* it does not exist.<br>
* DOM-Level 1
*
* @const NOT_FOUND_ERR
*/
define("NOT_FOUND_ERR", 8);
/**
* If the implementation does not support the requested type of object
* or operation.<br>
* DOM-Level 1
*
* @const NOT_SUPPORTED_ERR
*/
define("NOT_SUPPORTED_ERR", 9);
/**
* If an attempt is made to add an attribute that is already in
* use elsewhere.<br>
* DOM-Level 1
*
* @const INUSE_ATTRIBUTE_ERR
*/
define("INUSE_ATTRIBUTE_ERR", 10);
/**
* If an attempt is made to use an object that is not, or is no
* longer, usable.<br>
* DOM-Level 2
*
* @const INVALID_STATE_ERR
*/
define("INVALID_STATE_ERR", 11);
/**
* If an invalid or illegal string is specified.<br>
* DOM-Level 2
*
* @const SYNTAX_ERR
*/
define("SYNTAX_ERR", 12);
/**
* If an attempt is made to modify the type of the underlying object.<br>
* DOM-Level 2
*
* @const INVALID_MODIFICATION_ERR
*/
define("INVALID_MODIFICATION_ERR", 13);
/**
* If an attempt is made to create or change an object in a way which
* is incorrect with regard to namespaces.<br>
* DOM-Level 2
*
* @const NAMESPACE_ERR
*/
define("NAMESPACE_ERR", 14);
/**
* If a parameter or an operation is not supported by the underlying object.<br>
* DOM-Level 2
*
* @const INVALID_ACCESS_ERR
*/
define("INVALID_ACCESS_ERR", 15);
?>
--- NEW FILE: DOMImplementation.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DOMImplementation.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM DOMImplementation interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class DOMImplementation {
/**
* Tests to see if the DOM implementation supports a given named feature
* package.<br>
* DOM-Level 1
*
* @public
* @param $feature <code>string</code>
* @param $version <code>string</code>
* @returns boolean
*/
function hasFeature($feature, $version) {
if (($feature == "XML") || ($feature == "Core")) {
if ($version == "1.0") {
return true;
}
}
return false;
}
/**
* Creates a new, empty Document with the given document type.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $qualifiedName <code>string</code>
* @param $doctype <a href="DocumentType.html">DocumentType</a>
* @returns Document
*/
function &createDocument($namespaceURI, $qualifiedName, &$doctype) {
if (!(strpos($qualifiedName, ":") === false)) {
$prefix = substr($qualifiedName, 0, strpos($qualifiedName, ":"));
$localName = substr($qualifiedName, strpos($this->nodeName, ":")+1);
if (empty($prefix) || empty($localName)) {
return NAMESPACE_ERR;
}
}
else {
if (empty($qualifiedName)) {
return NAMESPACE_ERR;
}
}
if (empty($namespaceURI)) {
return NAMESPACE_ERR;
}
if (($namespaceURI != "http://www.w3.org/XML/1998/namespace") &&
($prefix == "xml")) {
return NAMESPACE_ERR;
}
if (!empty($doctype->ownerDocument)) {
return WRONG_DOCUMENT_ERR;
}
$doc = new Document();
$doc->doctype =& $doctype;
$doc->doctype->ownerDocument =& $this;
$doc->doctype->namespaceURI = $namespaceURI;
$doc->namespaceURI = $namespaceURI;
$doc->prefix = $prefix;
$doc->localName = $localName;
return $doc;
}
/**
* Creates an empty DocumentType node that is not associated with any
* document.<br>
* DOM-Level 2
*
* @public
* @param $qualifiedName <code>string</code>
* @param $publicId <code>string</code>
* @param $systemId <code>string</code>
* @returns DocumentType
*/
function createDocumentType($qualifiedName, $publicId, $systemId) {
if (!(strpos($qualifiedName, ":") === false)) {
$prefix = substr($qualifiedName, 0, strpos($qualifiedName, ":"));
$localName = substr($qualifiedName, strpos($this->nodeName, ":")+1);
if (empty($prefix) || empty($localName)) {
return NAMESPACE_ERR;
}
}
else {
if (empty($qualifiedName)) {
return NAMESPACE_ERR;
}
}
$dtd = new DocumentType();
$dtd->publicId = $publicId;
$dtd->systemId = $systemId;
$dtd->nodeName = $qualifiedName;
$dtd->prefix = $prefix;
$dtd->localName = $localName;
return $dtd;
}
}
?>
--- NEW FILE: Document.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Document.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM Document interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Document extends Node {
/**
* An instance of the DocumentType interface representing the DTD; If no
* DTD was declared in the document, this property is null.<br>
* DOM-Level 1
*
* @private
* @type DocumentType
*/
var $doctype;
/**
* Points to the single Element node that is the root of the XML tree.<br>
* DOM-Level 1
*
* @private
* @type Element
*/
var $documentElement;
/**
* An reference to the DOMImplementation that is responsible for this
* document.<br>
* DOM-Level 1
*
* @private
* @type DOMImplementation
*/
var $implementation;
/**
* Constructor of the class.<br>
*
* @public
*/
function Document() {
Node::Node();
$this->nodeType = DOCUMENT_NODE;
$this->nodeName = "#document";
}
/**
* Returns an reference to the DocumentType object.<br>
* DOM-Level 1
*
* @public
* @returns DocumentType
*/
function &getDoctype() {
return $this->doctype;
}
/**
* Returns an reference to the root element.<br>
* DOM-Level 1
*
* @public
* @returns Element
*/
function &getDocumentElement() {
return $this->documentElement;
}
/**
* Returns an reference to the DOMImplementation object.<br>
* DOM-Level 1
*
* @public
* @returns DOMImplementation
*/
function &getImplementation() {
return $this->implementation;
}
/**
* Creates an Attribute node.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @param $value <code>string</code>
* @returns Attr
*/
function &createAttribute($name) {
$new = new Attr();
$new->nodeName = $name;
$new->ownerElement = NULL;
$new->ownerDocument =& $this;
return $new;
}
/**
* Creates a CDataSection node.<br>
* DOM-Level 1
*
* @public
* @param $data
* @returns CDataSection
*/
function &createCDataSection($data) {
$new = new CDataSection();
$new->nodeValue = $data;
$new->ownerDocument = &$this;
return $new;
}
/**
* Creates a Comment node.<br>
* DOM-Level 1
*
* @public
* @param $data <code>string</code>
* @returns Comment
*/
function &createComment($data) {
$new = new Comment();
$new->nodeValue = $data;
$new->ownerDocument = &$this;
return $new;
}
/**
* Creates a DocumentFragment node.<br>
* DOM-Level 1
*
* @public
* @returns DocumentFragment
*/
function &createDocumentFragment() {
$new = new DocumentFragment();
return $new;
}
/**
* Creates an Element node.<br>
* DOM-Level 1
*
* @public
* @param $tagName <code>string</code>
* @returns Element
*/
function &createElement($tagName) {
$new = new Element();
$new->nodeName = $tagName;
$new->ownerDocument = &$this;
return $new;
}
/**
* Creates an EntityReference node (not supported yet)<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns EntityReference
*/
function &createEntityReference($name) {
return NOT_SUPPORTED_ERR;
}
/**
* Creates a ProcessingInstruction node.<br>
* DOM-Level 1
*
* @public
* @param $target <code>string</code>
* @param $data <code>string</code>
* @returns ProcessingInstruction
*/
function &createProcessingInstruction($target, $data) {
$new = new ProcessingInstruction();
$new->nodeValue = $data;
$new->nodeName = $target;
$new->ownerDocument = &$this;
return $new;
}
/**
* Creates a Text node.<br>
* DOM-Level 1
*
* @public
* @param $data <code>string</code>
* @returns Text
*/
function &createTextNode($data) {
$new = new Text();
$new->nodeValue = $data;
$new->ownerDocument = &$this;
return $new;
}
/**
* Returns a NodeList of Element nodes from the current document whose
* tagName attribute matches the given tagname.<br>
* DOM-Level 1
*
* @public
* @param $tagName <code>string</code>
* @returns NodeList
*/
function &getElementsByTagName($tagName) {
$result = new NodeList();
$this->getElementsByTagNameList($tagName, $this->documentElement, $result);
return $result;
}
/**
* Same as createAttribute, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $qualifiedName <code>string</code>
* @returns Attr
*/
function &createAttributeNS($namespaceURI, $qualifiedName) {
$prefix = substr($qualifiedName, 0, strpos($qualifiedName, ":"));
$localName = substr($qualifiedName, strpos($this->nodeName, ":")+1);
if (empty($prefix) || empty($localName)) {
return NAMESPACE_ERR;
}
if (empty($namespaceURI)) {
return NAMESPACE_ERR;
}
if (($namespaceURI != "http://www.w3.org/XML/1998/namespace") &&
($prefix == "xml")) {
return NAMESPACE_ERR;
}
if (($this->namespaceURI != "http://www.w3.org/2000/xmlns/") &&
($prefix == "xmlns")) {
return NAMESPACE_ERR;
}
if ($this->qualifiedName == "xmlns") {
return NAMESPACE_ERR;
}
$newAttr =& $this->createAttribute($qualifiedName);
$newAttr->namespaceURI = $namespaceURI;
$newAttr->localName = $localName;
$newAttr->prefix = $prefix;
return $newAttr;
}
/**
* Same as createElement, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $qualifiedName <code>string</code>
* @returns Element
*/
function &createElementNS($namespaceURI, $qualifiedName) {
$prefix = substr($qualifiedName, 0, strpos($qualifiedName, ":"));
$localName = substr($qualifiedName, strpos($this->nodeName, ":")+1);
if (empty($prefix) || empty($localName)) {
return NAMESPACE_ERR;
}
if (empty($namespaceURI)) {
return NAMESPACE_ERR;
}
if (($namespaceURI != "http://www.w3.org/XML/1998/namespace") &&
($prefix == "xml")) {
return NAMESPACE_ERR;
}
$newElem =& $this->createElement($qualifiedName);
$newElem->namespaceURI = $namespaceURI;
$newElem->localName = $localName;
$newElem->prefix = $prefix;
return $newElem;
}
/**
* Returns a Element node from the current document whose id attribute
* matches the given id.<br>
* DOM-Level 2 -- NYI
*
* @public
* @param $elementID <code>string</code>
* @returns Element
*/
function &getElementById($elementID) {
// This could not be implemented, as long as the DTD is not parsed.
return NOT_SUPPORTED_ERR;
}
/**
* Same as getElementByTagName, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns NodeList
*/
function &getElementsByTagNameNS($namespaceURI, $localName) {
$result = new NodeList();
$this->getElementsByTagNameNSList($namespaceURI, $localName,
$this->documentElement, $result);
return $result;
}
/**
* Creates a copy of a Node object from another document that can be
* inserted within the current documents node hierarchy.<br>
* DOM-Level 2
*
* @public
* @param $importedNode <a href="Node.html">Node</a>
* @param $deep <code>boolean</code>
* @returns Node
*/
function &importNode(&$importedNode, $deep) {
if ($importedNode->nodeType == ATTRIBUTE_NODE) {
$newNode =& $importedNode->cloneNode(true);
$newNode->ownerElement = NULL;
$newNode->specified = true;
}
else {
if (($importedNode->nodeType == ELEMENT_NODE) ||
($importedNode->nodeType == DOCUMENT_FRAGMENT_NODE) ||
($importedNode->nodeType == PROCESSING_INSTRUCTION_NODE) ||
($importedNode->nodeType == TEXT_NODE) ||
($importedNode->nodeType == CDATA_SECTION_NODE) ||
($importedNode->nodeType == COMMENT_NODE)) {
$newNode =& $importedNode->cloneNode($deep);
}
else {
return NOT_SUPPORTED_ERR;
}
}
$newNode->ownerDocument =& $this;
return $newNode;
}
/**
* Runs recursively through the DOM-Tree and returns a NodeList with all
* Element nodes that have the searched tagname.
*
* @private
* @param $tagName <code>string</code>
* @param $parent <a href="Node.html">Node</a>
* @param $result <a href="NodeList.html">NodeList</a>
* @returns void
*/
function getElementsByTagNameList($tagName, &$parent, &$result) {
if ($parent->nodeType == ELEMENT_NODE) {
if (($parent->tagName == $tagName) || ($tagName == "*")) {
$result->insertNode($parent);
}
if ($parent->hasChildNodes()) {
$this->getElementsByTagNameList($tagName, $parent->firstChild,
$result);
}
}
if (isset($parent->nextSibling)) {
$this->getElementsByTagNameList($tagName, $parent->nextSibling, $result);
}
}
/**
* Runs recursively through the DOM-Tree and returns a NodeList with all
* Element nodes that have the searched $namespaceURI and $localName.
*
* @private
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @param $parent <a href="Node.html">Node</a>
* @param $result <a href="NodeList.html">NodeList</a>
* @returns void
*/
function getElementsByTagNameNSList($namespaceURI, $localName, &$parent, &$result) {
if ($parent->nodeType == ELEMENT_NODE) {
if ((($parent->namespaceURI == $namespaceURI) &&
($parent->localName == $localName)) ||
(($namespaceURI == "*") && ($parent->localName == $localName)) ||
(($parent->namespaceURI == $namespaceURI) && ($localName == "*")) ||
(($namespaceURI == "*") && ($localName == "*"))) {
$result->insertNode($parent);
}
if ($parent->hasChildNodes()) {
$this->getElementsByTagNameNSList($namespaceURI, $localName,
$parent->firstChild, $result);
}
}
if (isset($parent->nextSibling)) {
$this->getElementsByTagNameNSList($namespaceURI, $localName,
$parent->nextSibling, $result);
}
}
}
?>
--- NEW FILE: DocumentFragment.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DocumentFragment.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM DocumentFragment interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class DocumentFragment extends Node {
/**
* Constructor of the class.
*
* @public
*/
function DocumentFragment() {
Node::Node();
$this->nodeType = DOCUMENT_FRAGMENT_NODE;
$this->nodeName = "#document-fragment";
}
}
?>
--- NEW FILE: DocumentType.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DocumentType.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM DocumentType interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class DocumentType extends Node {
/**
* A list of all generall entities declared in the DTD.<br>
* DOM-Level 1-- NYI
*
* @private
* @type string
*/
var $entities;
/**
* The name of the DTD.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $name;
/**
* Contains a list of XML notation declarations.<br>
* DOM-Level 1 -- NYI
*
* @private
* @type string
*/
var $notations;
/**
* Contains the documents internat subset as a string value.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $internalSubset;
/**
* The public identifier of the external subset.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $publicId;
/**
* The system identifier of the external subset.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $systemId;
/**
* Constructor of the class.<br>
*
* @public
*/
function DocumentType() {
Node::Node();
$this->nodeType = DOCUMENT_TYPE_NODE;
$this->name =& $this->nodeName;
//$notation = new NamedNodeMap();
//$entities = new NamedNodeMap();
}
/**
* Returns a NamedNodeMap containing all general entities declared in the
* DTD.<br>
* DOM-Level 1 -- NYI
*
* @public
* @returns NamedNodeMap
*/
function getEntities() {
return NOT_SUPPORTED_ERR;
}
/**
* Returns the internal subset.<br>
* DOM-Level 2
*
* @public
* @returns string
*/
function getInternalSubset() {
return $this->internalSubset;
}
/**
* Returns the name of the DTD.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getName() {
return $this->name;
}
/**
* Returns a NamedNodeMap containing all notations declared in the
* DTD.<br>
* DOM-Level 1 -- NYI
*
* @public
* @returns NamedNodeMap
*/
function getNotations() {
return NOT_SUPPORTED_ERR;
}
/**
* Returns the public identifier of an external subset.<br>
* DOM-Level 2
*
* @public
* @returns string
*/
function getPublicId() {
return $this->publicId;
}
/**
* Returns the system identifier of an external subset.<br>
* DOM-Level 2
*
* @public
* @returns string
*/
function getSystemId() {
return $this->systemId;
}
}
?>
--- NEW FILE: Element.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Element.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM Element interface.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Element extends Node {
/**
* The XML tag name.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $tagName;
/**
* Constructor of the class.
*
* @public
*/
function Element() {
$this->Node();
$this->nodeType = ELEMENT_NODE;
$this->tagName =& $this->nodeName;
}
/**
* Returns the XML tag name of the element.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getTagName() {
return $this->tagName;
}
/**
* Returns the value of the attribute specified by the name parameter.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns string
*/
function getAttribute($name) {
$attr =& $this->getAttributeNode($name);
return $attr->getValue();
}
/**
* Returns the attribute specified by the name parameter.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns Attr
*/
function &getAttributeNode($name) {
if (isset($this->attributes)) {
return $this->attributes->getNamedItem($name);
}
}
/**
* Returns a NodeList of all child Element nodes whose tagName attribute
* matches the give name parameter.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns NodeList
*/
function &getElementsByTagName($name) {
$result = new NodeList();
$this->getElementsByTagNameList($name, $this->firstChild, $result);
return $result;
}
/**
* Removes the Attribute node specified by name.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns void
*/
function removeAttribute($name) {
if (isset($this->attributes)) {
$this->attributes->removeNamedItem($name);
}
}
/**
* Removes the specified Attribute node.<br>
* DOM-Level 1
*
* @public
* @param $oldAttr <a href="Attr.html">Attr</a>
* @returns Attr
*/
function &removeAttributeNode(&$oldAttr) {
if (isset($this->attributes)) {
return $this->attributes->removeNamedItem($oldAttr->nodeName);
}
}
/**
* Set the Attribute name to the value. If the node does not exist, it is
* created.<br>
* DOM-Level 1
*
* @public
* @param $name string
* @param $value string
* @returns void
*/
function setAttribute($name, $value) {
$new = new Attr();
$new->nodeName = $name;
$new->setValue($value);
$new->ownerElement = &$this;
$new->ownerDocument = &$this->ownerDocument;
if (empty($this->attributes)) {
$this->attributes = new NamedNodeMap();
}
$this->attributes->setNamedItem($new);
}
/**
* Sets the specified Attribute node.<br>
* DOM-Level 1
*
* @public
* @param $newAttr <a href="Attr.html">Attr</a>
* @returns Attr
*/
function &setAttributeNode(&$newAttr) {
if (empty($this->attributes)) {
$this->attributes = new NamedNodeMap();
}
return $this->attributes->setNamedItem($newAttr);
}
/**
* Same as getAttribute, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns string
*/
function getAttributeNS($namespaceURI, $localName) {
if (isset($this->attributes)) {
$attr =& $this->attributes->getNamedItemNS($namespaceURI, $localName);
return $attr->getValue();
}
}
/**
* Same as getAttributeNode, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns Attr
*/
function &getAttributeNodeNS($namespaceURI, $localName) {
if (isset($this->attributes)) {
return $this->attributes->getNamedItemNS($namespaceURI, $localName);
}
}
/**
* Same as getElementsByTagName, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns NodeList
*/
function &getElementsByTagNameNS($namespaceURI, $localName) {
$result = new NodeList();
$this->getElementsByTagNameNSList($namespaceURI, $localName, $this->firstChild, $result);
return $result;
}
/**
* Returns true when an attribute with a given name is specified on this
* element or has a default value, false otherwise. <br>
* DOM-Level 2
*
* @public
* @param $name <code>string</code>
* @returns boolean
*/
function hasAttribute($name) {
if (empty($this->attributes)) {
return false;
}
$attr =& $this->attributes->getNamedItem($name);
if (!empty($attr)) {
return true;
}
return false;
}
/**
* Same as hasAttribute, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns boolean
*/
function hasAttributeNS($namespaceURI, $localName) {
if (empty($this->attributes)) {
return false;
}
$attr =& $this->attributes->getNamedItemNS($namespaceURI, $localName);
if (!empty($attr)) {
return true;
}
return false;
}
/**
* Same as removeAttribute, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns void
*/
function removeAttributeNS($namespaceURI, $localName) {
if (isset($this->attributes)) {
$this->attributes->removeNamedItemNS($namespaceURI, $localName);
}
}
/**
* Same as setAttribute, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns void
*/
function setAttributeNS($namespaceURI, $qualifiedName, $value) {
$prefix = substr($qualifiedName, 0, strpos($qualifiedName, ":"));
$localName = substr($qualifiedName, strpos($this->nodeName, ":")+1);
if (empty($prefix) || empty($localName)) {
return NAMESPACE_ERR;
}
if (empty($namespaceURI)) {
return NAMESPACE_ERR;
}
if (($namespaceURI != "http://www.w3.org/XML/1998/namespace") &&
($prefix == "xml")) {
return NAMESPACE_ERR;
}
if (($this->namespaceURI != "http://www.w3.org/2000/xmlns/") &&
($prefix == "xmlns")) {
return NAMESPACE_ERR;
}
if ($this->qualifiedName == "xmlns") {
return NAMESPACE_ERR;
}
$new = new Attr();
$new->nodeName = $qualifiedName;
$new->prefix = $prefix;
$new->localName = $localName;
$new->setValue($value);
$new->ownerElement = &$this;
$new->ownerDocument = &$this->ownerDocument;
if (empty($this->attributes)) {
$this->attributes = new NamedNodeMap();
}
$this->attributes->setNamedItemNS($new);
}
/**
* Same as setAttributeNode, but includes support for XML namespaces.<br>
* DOM-Level 2
*
* @public
* @param $newAttr <a href="Attr.html">Attr</a>
* @returns Attr
*/
function setAttributeNodeNS(&$newAttr) {
if (empty($this->attributes)) {
$this->attributes = new NamedNodeMap();
}
return $this->attributes->setNamedItemNS($newAttr);
}
/**
* Runs recursively through the DOM-Tree and returns a NodeList with all
* Element nodes that have the searched tagname.
*
* @private
* @param $tagName <code>string</code>
* @param $parent <a href="Node.html">Node</a>
* @param $result <a href="NodeList.html">NodeList</a>
* @returns void
*/
function getElementsByTagNameList($tagName, &$parent, &$result) {
if ($parent->nodeType == ELEMENT_NODE) {
if (($parent->tagName == $tagName) || ($tagName == "*")) {
$result->insertNode($parent);
}
if ($parent->hasChildNodes()) {
$this->getElementsByTagNameList($tagName, $parent->firstChild,
$result);
}
}
if (isset($parent->nextSibling)) {
$this->getElementsByTagNameList($tagName, $parent->nextSibling, $result);
}
}
/**
* Runs recursively through the DOM-Tree and returns a NodeList with all
* Element nodes that have the searched $namespaceURI and $localName.
*
* @private
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @param $parent <a href="Node.html">Node</a>
* @param $result <a href="NodeList.html">NodeList</a>
* @returns void
*/
function getElementsByTagNameNSList($namespaceURI, $localName, &$parent, &$result) {
if ($parent->nodeType == ELEMENT_NODE) {
if ((($parent->namespaceURI == $namespaceURI) &&
($parent->localName == $localName)) ||
(($namespaceURI == "*") && ($parent->localName == $localName)) ||
(($parent->namespaceURI == $namespaceURI) && ($localName == "*")) ||
(($namespaceURI == "*") && ($localName == "*"))) {
$result->insertNode($parent);
}
if ($parent->hasChildNodes()) {
$this->getElementsByTagNameNSList($namespaceURI, $localName,
$parent->firstChild, $result);
}
}
if (isset($parent->nextSibling)) {
$this->getElementsByTagNameNSList($namespaceURI, $localName,
$parent->nextSibling, $result);
}
}
}
?>
--- NEW FILE: Entity.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Entity.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM Entity interface. Not supported yet.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Entity extends Node {
// Sorry, not supported yet!
}
?>
--- NEW FILE: EntityReference.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: EntityReference.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM EntityReference interface. Not supported yet.
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class EntityReference extends Node {
// Sorry, not supported yet.
}
?>
--- NEW FILE: NamedNodeMap.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: NamedNodeMap.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Class representing the DOM NamedNodeMap interface
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class NamedNodeMap {
/**
* Contains all items of tbe NamedNodeMap.<br>
*
* @private
* @type array
*/
var $nodes;
/**
* The number of nodes in this map.<br>
* DOM-Level 1
*
* @private
* @type int
*/
var $length = 0;
/**
* Returns the number of nodes in the map.<br>
* DOM-Level 1
*
* @public
* @returns int
*/
function getLength() {
return $this->length;
}
/**
* Retrieves a node specified by name<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns Node
*/
function &getNamedItem($name) {
return $this->nodes[$name];
}
/**
* Returns the indexth item in this map.<br>
* DOM-Level 1
*
* @public
* @param $index <code>int</code>
* @returns Node
*/
function &item($index) {
$count = 0;
reset($this->nodes);
while (list($key, $value) = each($this->nodes)) {
if ($count == $index) {
return $this->nodes[$key];
}
$count++;
}
return null;
}
/**
* Removes a node specified by name.<br>
* DOM-Level 1
*
* @public
* @param $name <code>string</code>
* @returns Node
*/
function &removeNamedItem($name) {
if (isset($this->nodes[$name])) {
$removed =& $this->nodes[$name];
unset($this->nodes[$name]);
$this->length--;
return $removed;
}
else {
return NOT_FOUND_ERR;
}
}
/**
* Adds a node using its nodeName attribute.<br>
* DOM-Level 1
*
* @public
* @param $arg <a href="Node.html">Node</a>
* @returns Node
*/
function &setNamedItem(&$arg) {
if (!isset($this->nodes[$arg->nodeName])) {
$this->length++;
$save = null;
}
else {
$save =& $this->nodes[$arg->nodeName];
}
$this->nodes[$arg->nodeName] =& $arg;
return $save;
}
/**
* Retrieves a node specified by local name and namespace URI.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns Node
*/
function &getNamedItemNS($namespaceURI, $localName) {
return $this->getNamedItem($namespaceURI.":".$localName);
}
/**
* Removes a node specified by local name and namespace URI.<br>
* DOM-Level 2
*
* @public
* @param $namespaceURI <code>string</code>
* @param $localName <code>string</code>
* @returns Node
*/
function &removeNamedItemNS($namespaceURI, $localName) {
return $this->removeNamedItem($namespaceURI.":".$localName);
}
/**
* Adds a node using its $namespaceURI and $localName<br>
* DOM-Level 2
*
* @public
* @param $arg <a href="Node.html">Node</a>
* @returns Node
*/
function &setNamedItemNS(&$arg) {
if (!isset($this->nodes[$arg->namespaceURI.":".$arg->localName])) {
$this->length++;
$save = null;
}
else {
$save =& $this->nodes[$arg->namespaceURI.":".$arg->localName];
}
$this->nodes[$arg->namespaceURI.":".$arg->localName] =& $arg;
return $save;
}
}
?>
--- NEW FILE: Node.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: Node.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* @const ELEMENT_NODE
*/
define("ELEMENT_NODE", 1);
/**
* @const ATTRIBUTE_NODE
*/
define("ATTRIBUTE_NODE", 2);
/**
* @const TEXT_NODE
*/
define("TEXT_NODE", 3);
/**
* @const CDATA_SECTION_NODE
*/
define("CDATA_SECTION_NODE", 4);
/**
* @const ENTITY_REFERENCE_NODE
*/
define("ENTITY_REFERENCE_NODE", 5);
/**
* @const ENTITY_NODE
*/
define("ENTITY_NODE", 6);
/**
* @const PROCESSING_INSTRUCTION_NODE
*/
define("PROCESSING_INSTRUCTION_NODE", 7);
/**
* @const COMMENT_NODE
*/
define("COMMENT_NODE", 8);
/**
* @const DOCUMENT_NODE
*/
define("DOCUMENT_NODE", 9);
/**
* @const DOCUMENT_TYPE_NODE
*/
define("DOCUMENT_TYPE_NODE", 10);
/**
* @const DOCUMENT_FRAGMENT_NODE
*/
define("DOCUMENT_FRAGMENT_NODE", 11);
/**
* @const NOTATION_NODE
*/
define("NOTATION_NODE", 12);
/**
* Class representing the DOM Node interface
*
* @package phpXD
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class Node {
/**
* MD5-Hash to compare two nodes.
*
* This ID is necessary to compare two nodes, because the operator ==
* is not implemented for objects/references in PHP4.
*
* @private
* @type string
*/
var $nodeID;
/**
* Provides access to a list of Attr objects in a NamedNodeMap.<br>
* DOM-Level 1
*
* @private
* @type NamedNodeMap
*/
var $attributes;
/**
* A NodeList containing a reference to every child in this Node.<br>
* DOM-Level 1
*
* @private
* @type NodeList
*/
var $childNodes;
/**
* Points to the head of the linked list of children in this node.<br>
* DOM-Level 1
*
* @private
* @type Node
*/
var $firstChild;
/**
* Points to the end of the linked list of children in the node.<br>
* DOM-Level 1
*
* @private
* @type Node
*/
var $lastChild;
/**
* Points to the next Node in the siblings list.<br>
* DOM-Level 1
*
* @private
* @type Node
*/
var $nextSibling;
/**
* Depending on the object type (nodeType), this attribute may map to
* another attribute of the object or a constant string.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $nodeName;
/**
* Contains a value that indicates the true type of the Node.<br>
* DOM-Level 1
*
* @private
* @type int
*/
var $nodeType;
/**
* Depending on the nodeType, this attribute contains null or the
* content/value of the node.<br>
* DOM-Level 1
*
* @private
* @type string
*/
var $nodeValue;
/**
* Points to the Document used to create this Node object.<br>
* DOM-Level 1
*
* @private
* @type Document
*/
var $ownerDocument;
/**
* Points to the parent of this node.<br>
* DOM-Level 1
*
* @private
* @type Node
*/
var $parentNode;
/**
* Points to the previous Node in the siblings list.<br>
* DOM-Level 1
*
* @private
* @type Node
*/
var $previousSibling;
/**
* Contains the local part of the fully qualified node name.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $localName;
/**
* The namespace URI given to this Node object at creation time, null
* if no namespace was given.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $namespaceURI;
/**
* The namespace prefix of this Node, used for nodes that support namespace
* prefixes.<br>
* DOM-Level 2
*
* @private
* @type string
*/
var $prefix;
/**
* Constructor of the class.
*
* @public
*/
function Node() {
$this->nodeID = microtime()." ".rand();
}
/**
* Provides access to a list of Attr objects in a NamedNodeMap.<br>
* DOM-Level 1
*
* @public
* @returns NamedNodeMap
*/
function &getAttributes() {
return $this->attributes;
}
/**
* Returns a NodeList containing a reference to every child in this Node.<br>
* DOM-Level 1
*
* @public
* @returns NodeList
*/
function &getChildNodes() {
return $this->childNodes;
}
/**
* Returns a reference to the head of the linked list of children
* in this node.<br>
* DOM-Level 1
*
* @public
* @returns Node
*/
function &getFirstChild() {
return $this->firstChild;
}
/**
* Returns a reference to the end of the linked list of children
* in this node.<br>
* DOM-Level 1
*
* @public
* @returns Node
*/
function &getLastChild() {
return $this->lastChild;
}
/**
* Returns a reference to the next node in the siblings list.<br>
* DOM-Level 1
*
* @public
* @returns Node
*/
function &getNextSibling() {
return $this->nextSibling;
}
/**
* Returns the name of the node or null if the node has no name.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getNodeName() {
return $this->nodeName;
}
/**
* Returns the type of the node.<br>
* DOM-Level 1
*
* @public
* @returns int
*/
function getNodeType() {
return $this->nodeType;
}
/**
* Returns the value of the node or null if the node has no value.<br>
* DOM-Level 1
*
* @public
* @returns string
*/
function getNodeValue() {
return $this->nodeValue;
}
/**
* Sets the value of this node.<br>
* DOM-Level 1
*
* @public
* @param $nodeValue <code>string</code>
* @returns void
*/
function setNodeValue($nodeValue) {
if (($this->nodeType == ELEMENT_NODE) ||
($this->nodeType == ENTITY_REFERENCE_NODE) ||
($this->nodeType == ENTITY_NODE) ||
($this->nodeType == DOCUMENT_NODE) ||
($this->nodeType == DOCUMENT_TYPE_NODE) ||
($this->nodeType == DOCUMENT_FRAGMENT_NODE) ||
($this->nodeType == NOTATION)) {
return NO_MODIFICATION_ALLOWED_ERR;
}
$this->nodeValue = $nodeValue;
return null;
}
/**
* Returns a reference to the Document used to create this node.<br>
* DOM-Level 1
*
* @public
* @returns Document
*/
function &getOwnerDocument() {
return $this->ownerDocument;
}
/**
* Returns the parent of this node.<br>
* DOM-Level 1
*
* @public
* @returns Node
*/
function &getParentNode() {
return $this->parentNode;
}
/**
* Returns the previous node in the siblings list.<br>
* DOM-Level 1
*
* @public
* @returns Node
*/
function &getPreviousSibling() {
return $this->previousSibling;
}
/**
* Appends the $newChild node to the end of the child list if the node is
* a permitted child of this node.<br>
* DOM-Level 1
*
* @public
* @param $newChild <a href="Node.html">Node</a>
* @returns Node
*/
function &appendChild(&$newChild) {
if (($newChild->nodeType == DOCUMENT_FRAGMENT_NODE) &&
($this->nodeType != DOCUMENT_FRAGMENT_NODE)) {
for ($i = 0; $i < $newChild->childNodes->getLength(); $i++) {
$save = &$this->appendChild($newChild->childNodes->item($i));
}
return $save;
}
$check = $this->checkHierarchy($newChild);
if ($check > 0) {
return $check;
}
$check = $this->checkDocument($newChild);
if ($check > 0) {
return $check;
}
if (isset($newChild->parentNode)) {
$result = $newChild->parentNode->removeChild($newChild);
}
$newChild->parentNode = &$this;
$newChild->ownerDocument = &$this->ownerDocument;
unset($newChild->nextSibling);
unset($newChild->previousSibling);
if (!isset($this->firstChild)) {
$this->firstChild = &$newChild;
$this->lastChild = &$newChild;
$this->childNodes = new NodeList();
}
else {
$this->lastChild->nextSibling = &$newChild;
$newChild->previousSibling = &$this->lastChild;
$this->lastChild = &$newChild;
}
$this->childNodes->insertNode($newChild);
return $newChild;
}
/**
* Returns a copy of the node without the parent node; If $deep is true,
* all children are also copied.<br>
* DOM-Level 1
*
* @public
* @param $deep <code>boolean</code>
* @returns Node
*/
function &cloneNode($deep) {
$clone = $this;
$clone->Node();
unset($clone->attributes);
unset($clone->childNodes);
unset($clone->firstChild);
unset($clone->lastChild);
unset($clone->nextSibling);
unset($clone->parentNode);
unset($clone->previousSibling);
if (isset($this->attributes)) {
$clone->attributes = new NamedNodeMap();
unset($oldAttr);
for ($i = 0; $i < $this->attributes->getLength(); $i++) {
$attr =& $this->attributes->item($i);
$newAttr[$i] =& $attr->cloneNode(true);
$newAttr[$i]->specified = true;
if (!isset($oldAttr)) {
$clone->firstAttr = &$newAttr[$i];
}
else {
$oldAttr->nextSibling = &$newAttr[$i];
$newAttr[$i]->previousSibling = &$oldAttr;
}
$clone->attributes->setNamedItem($newAttr[$i]);
$oldAttr = &$newAttr[$i];
}
$clone->lastAttr = &$oldAttr;
}
if ($deep) {
if (isset($this->childNodes)) {
$clone->childNodes = new NodeList();
$oldChild = null;
for ($i = 0; $i < $this->childNodes->getLength(); $i++) {
$child =& $this->childNodes->item($i);
$newChild[$i] =& $child->cloneNode($deep);
if (!isset($oldChild)) {
$clone->firstChild = &$newChild[$i];
}
else {
$oldChild->nextSibling = &$newChild[$i];
$newChild[$i]->previousSibling = &$oldChild;
}
$clone->childNodes->insertNode($newChild[$i]);
$oldChild = &$newChild[$i];
}
$clone->lastChild = &$oldChild;
}
}
return $clone;
}
/**
* This method provides a quick way to check if a node has children.<br>
* DOM-Level 1
*
* @public
* @returns boolean
*/
function hasChildNodes() {
if (isset($this->firstChild)) {
return true;
}
return false;
}
/**
* Inserts the Node object $newChild into the child list of the parent node;
* The $refChild parameter allows you to specify where to insert the new
* node; If $refChild is null, newChild is inserted at the end of the child
* list; If $newChild is linked into the document tree, it is removed before
* it is inserted in its new position.<br>
* DOM-Level 1
*
* @public
* @param $newChild <a href="Node.html">Node</a>
* @param $refChild <a href="Node.html">Node</a>
* @returns Node
*/
function &insertBefore(&$newChild, &$refChild) {
if (($newChild->nodeType == DOCUMENT_FRAGMENT_NODE) &&
($this->nodeType != DOCUMENT_FRAGMENT_NODE)) {
for ($i = 0; $i < $newChild->childNodes->getLength(); $i++) {
$save = &$this->insertBefore($newChild->childNodes->item($i),
$refChild);
}
return $save;
}
$check = $this->checkHierarchy($newChild);
if ($check > 0) {
return $check;
}
$check = $this->checkDocument($newChild);
if ($check > 0) {
return $check;
}
if (isset($newChild->parentNode)) {
$result = $newChild->parentNode->removeChild($newChild);
}
$newChild->parentNode = &$this;
$newChild->ownerDocument = &$this->ownerDocument;
unset($newChild->nextSibling);
unset($newChild->previousSibling);
if (isset($this->childNodes)) {
for ($i = 0; $i < $this->childNodes->getLength(); $i++) {
$child =& $this->childNodes->item($i);
if ($child->nodeID == $refChild->nodeID && !$inserted) {
if ($i > 0) {
$prevChild = &$this->childNodes->item($i-1);
$prevChild->nextSibling = &$newChild;
$newChild->previousSibling = &$prevChild;
}
else {
$this->firstChild = &$newChild;
}
$newChild->nextSibling = &$child;
$child->previousSibling = &$newChild;
$this->childNodes->insertNode($newChild, $i);
return $newChild;
}
}
}
else {
$this->firstChild = &$newChild;
$this->lastChild = &$this->firstChild;
$this->childNodes = new NodeList();
$this->childNodes->insertNode($newChild);
return $newChild;
}
if (!isset($refChild)) {
$this->lastChild->nextSibling = &$newChild;
$newChild->previousSibling = &$this->lastChild;
$this->lastChild = &$newChild;
$this->childNodes->insertNode($newChild);
return $newChild;
}
else {
return NOT_FOUND_ERR;
}
}
/**
* Unlinks the $oldChild node from the child list.<br>
* DOM-Level 1
*
* @public
* @param $oldChild <a href="Node.html">Node</a>
* @returns Node
*/
function &removeChild($oldChild) {
if (isset($this->childNodes)) {
for ($i = 0; $i < $this->childNodes->getLength(); $i++) {
$child =& $this->childNodes->item($i);
if ($child->nodeID == $oldChild->nodeID) {
if ($i > 0) {
$prevChild = &$this->childNodes->item($i-1);
$prevChild->nextSibling = &$child->nextSibling;
if (isset($child->nextSibling)) {
$child->nextSibling->previousSibling = &$prevChild;
}
else {
$this->lastChild = &$prevChild;
}
}
else {
$this->firstChild = &$child->nextSibling;
}
$removedNode = &$this->childNodes->nodes[$i];
$this->childNodes->removeNode($i);
return $removedNode;
}
}
}
return NOT_FOUND_ERR;
}
/**
* Replaces the child node $oldChild with $newChild; If $newChild is linked
* into the document tree, it is removed before the replace is performed.<br>
* DOM-Level 1
*
* @public
* @param $newChild <a href="Node.html">Node</a>
* @param $oldChild <a href="Node.html">Node</a>
* @returns Node
*/
function &replaceChild($newChild, $oldChild) {
if (($newChild->nodeType == DOCUMENT_FRAGMENT_NODE) &&
($this->nodeType != DOCUMENT_FRAGMENT_NODE)) {
for ($i = 0; $i < $newChild->childNodes->getLength(); $i++) {
$save = &$this->insertBefore($newChild->childNodes->item($i),
$oldChild);
}
return $this->removeChild($oldChild);
}
$check = $this->checkHierarchy($newChild);
if ($check > 0) {
return $check;
}
$check = $this->checkDocument($newChild);
if ($check > 0) {
return $check;
}
if (isset($newChild->parentNode)) {
$result = $newChild->parentNode->removeChild($newChild);
}
$newChild->parentNode = &$this;
$newChild->ownerDocument = &$this->ownerDocument;
if (isset($this->childNodes)) {
for ($i = 0; $i < $this->childNodes->getLength(); $i++) {
$child =& $this->childNodes->item($i);
if ($child->nodeID == $oldChild->nodeID) {
if ($i > 0) {
$prevChild = &$this->childNodes->item($i-1);
$prevChild->nextSibling = &$newChild;
}
else {
$this->firstChild = &$newChild;
}
$newChild->nextSibling = &$child->nextSibling;
$newChild->previousSibling = &$child->previousSibling;
if (isset($newChild->nextSibling)) {
$newChild->nextSibling->previousSibling = &$newChild;
}
else {
$this->lastChild = &$newChild;
}
$this->childNodes->replaceNode($newChild, $i);
return $oldChild;
}
}
}
return NOT_FOUND_ERR;
}
/**
* Returns the local part of the fully qualified node name.<br>
* DOM-Level 2
*
* @public
* @returns string
*/
function getLocalName() {
return $this->localName;
}
/**
* Returns the namespace URI of this node.<br>
* DOM-Level 2
*
* @public
* @returns string
*/
fun...
[truncated message content] |
|
From: Thomas D. <th...@us...> - 2002-01-25 22:18:21
|
Update of /cvsroot/phpxd/phpXD/include/parser
In directory usw-pr-cvs1:/tmp/cvs-serv12964/include/parser
Added Files:
DOMParser.php
Log Message:
--- NEW FILE: DOMParser.php ---
<?php
// phpXD - a XML DOM Implementation
//
// This Software and all associated files are released unter the
// GNU Public License (GPL), see LICENSE for details.
//
// $Id: DOMParser.php,v 1.1 2002/01/25 22:18:18 thomi Exp $
/**
* Parse a document.
*
* @package DOMParser
* @author Thomas Dohmke <th...@do...>
* @version $Revision: 1.1 $
*/
class DOMParser {
/**
* The Document node.
*
* @private
* @type Document
*/
var $document;
/**
* The current Element node which is parsed. Only valid while
* parsing a XML file!
*
* @private
* @type Node
*/
var $currentNode;
/**
* The last node which is parsed. Only valid while parsing a XML file!
*
* @private
* @type Node
*/
var $lastNode;
/**
* A CDataSection is parsed. All strings will be collected to one
* CDataSection node. Only valid while parsing a XML file!
*
* @private
* @type boolean
*/
var $parseCData = false;
/**
* The parsed DTD string. Only valid while parsing a XML file!
*
* @private
* @type string
*/
var $parsedDTD = false;
/**
* The parsed DTD is an internal DTD. Only valid while parsing
* a XML file!
*
* @private
* @type boolean
*/
var $parsedDTDInternal = false;
/**
* A array with the defined namespaces.
*
* @private
* @type array
*/
var $namespaces = false;
/**
* The Constructor of the class.
*
* @public
* @returns void
*/
function DOMParser() {
$this->namespaces["xml"] = "http://www.w3.org/XML/1998/namespace";
$this->namespaces["xmlns"] = "http://www.w3.org/2000/xmlns/";
}
/**
* Loads the XML file specified by $file and creates the DOM tree.
*
* @public
* @param $file <code>string</code>
* @returns phpXD
*/
function parseFile($file) {
if (file_exists($file)) {
$content = implode("", file($file));
if (!empty($content)) {
$this->document = new Document();
$parser = xml_parser_create();
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
xml_set_object($parser, $this);
xml_set_element_handler($parser, "handleStartElement",
"handleEndElement");
xml_set_character_data_handler($parser, "handleCharacterData");
xml_set_processing_instruction_handler($parser,
"handleProcessingInstruction");
xml_set_default_handler($parser, "handleDefault");
if (!xml_parse($parser, $content, true)) {
$this->displayError("XML error in file %s, line %d: %s",
$file, xml_get_current_line_number($parser),
xml_error_string(xml_get_error_code($parser)));
}
xml_parser_free($parser);
return $this->document;
}
}
else {
$this->displayError("File %s could not be found or read.", $file);
}
}
/**
* The Element Start Handler for Expat.
*
* @private
* @returns void
*/
function handleStartElement($parser, $name, $attributes) {
if (!(strpos($name, ":") === false)) {
$prefix = substr($name, 0, strpos($name, ":"));
if (is_array($attributes) &&
!empty($attributes["xmlns:".$prefix])) {
$namespace = $attributes["xmlns:".$prefix];
}
else {
if (is_array($this->namespaces) &&
!empty($this->namespaces[$prefix])) {
$namespace = $this->namespaces[$prefix];
}
else {
$this->displayError("XML error: unknown namespace in line %d.",
xml_get_current_line_number($parser));
}
}
$this->namespaces[$prefix] = $namespace;
}
if (!(strpos($name, ":") === false)) {
$newChild =& $this->document->createElementNS($namespace, $name);
if ($newChild == NAME_SPACE_ERR) {
$this->displayError("XML error: namespace not valid in line %d.",
xml_get_current_line_number($parser));
}
}
else {
$newChild =& $this->document->createElement($name);
}
if (!isset($this->document->documentElement)) {
$this->document->documentElement =& $newChild;
$this->currentNode =& $this->document->documentElement;
}
else {
$this->currentNode->appendChild($newChild);
$this->currentNode =& $newChild;
}
if (is_array($attributes)) {
while (list($name, $value) = each($attributes)) {
if (!(strpos($name, ":") === false)) {
$prefix = substr($name, 0, strpos($name, ":"));
$localName = substr($name, strpos($this->nodeName, ":")+1);
if ($prefix == "xmlns") {
$this->namespaces[$localName] = $value;
$namespace = $this->namespaces["xmlns"];
}
else {
if (is_array($attributes) &&
!empty($attributes["xmlns:".$prefix])) {
$namespace = $attributes["xmlns:".$prefix];
}
else {
if (is_array($this->namespaces) &&
!empty($this->namespaces[$prefix])) {
$namespace = $this->namespaces[$prefix];
}
else {
$this->displayError("XML error: unknown namespace".
" in line %d.",
xml_get_current_line_number($parser));
}
}
}
$result = $this->currentNode->setAttributeNS($namespace, $name,
$value);
if ($result == NAME_SPACE_ERR) {
$this->displayError("XML error: namespace not valid in line %d.",
xml_get_current_line_number($parser));
}
$attr =& $this->currentNode->getAttributeNode($name);
$attr->specified = true;
}
else {
$this->currentNode->setAttribute($name, $value);
$attr =& $this->currentNode->getAttributeNode($name);
$attr->specified = true;
}
}
}
$this->lastNode =& $this->currentNode;
}
/**
* The Element End Handler for Expat.
*
* @private
* @returns void
*/
function handleEndElement($parser, $name) {
$this->currentNode =& $this->currentNode->parentNode;
$this->lastNode =& $this->currentNode;
}
/**
* The CharacterData Handler for Expat.
*
* @private
* @returns void
*/
function handleCharacterData($parser, $text) {
if ($this->parseCData) {
if ($this->lastNode->nodeType == CDATA_SECTION_NODE) {
$this->lastNode->appendData($text);
}
else {
$this->lastNode =& $this->currentNode->appendChild(
$this->document->createCDataSection($text));
}
}
else {
$text = str_replace("\t", " ", $text);
$text = str_replace("\n", " ", $text);
$text = str_replace("\r", " ", $text);
$text = str_replace(" ", " ", $text);
$text = preg_replace("/\ +/", " ", $text);
$this->lastNode =& $this->currentNode->appendChild(
$this->document->createTextNode($text));
}
}
/**
* The ProcessingInstruction Handler for Expat.
*
* @private
* @returns void
*/
function handleProcessingInstruction($parser, $target, $data) {
if (!isset($this->document->documentElement)) {
$this->document->appendChild(
$this->document->createProcessingInstruction($target, $data));
}
else {
$this->lastNode =& $this->currentNode->appendChild(
$this->document->createProcessingInstruction(
$target, $data));
}
}
/**
* The DTD Handler. Expat has no DTD Handler callback, so this
* is set by handleDefault.
*
* @private
* @returns void
*/
function handleDTD($parser, $data) {
$data = trim($data);
if (!empty($data)) {
$this->parsedDTD .= " ".$data;
}
if ($data == "[") {
$this->parseDTDInternal = true;
}
if ($data == "]") {
$this->parseDTDInternal = false;
}
if ((substr($this->parsedDTD, strlen($this->parsedDTD)-1) == ">") &&
!$this->parseDTDInternal) {
$this->document->doctype = new DocumentType();
// this is just a hack to differ between internal and external DTDs
$DTD = explode(" ", $this->parsedDTD);
$this->document->doctype->name = $DTD[1];
if ($DTD[2] == "SYSTEM") {
$this->document->doctype->systemId = $DTD[3];
}
else {
if ($DTD[2] == "PUBLIC") {
$this->document->doctype->publicId = $DTD[3];
$this->document->doctype->systemId = $DTD[4];
}
else {
$this->document->doctype->internalSubset = $this->parsedDTD;
}
}
xml_set_default_handler($parser, "handleDefault");
return true;
}
}
/**
* The Default Handler for Expat.
*
* @private
* @returns void
*/
function handleDefault($parser, $data) {
$data = trim($data);
if (!(strpos($data, "<!--") === false)) {
$data = str_replace("<!--", "", $data);
$data = str_replace("-->", "", $data);
if (!isset($this->document->documentElement)) {
$this->document->appendChild(
$this->document->createComment($data));
}
else {
$this->lastNode =& $this->currentNode->appendChild(
$this->document->createComment($data));
}
return true;
}
if ($data == "<![CDATA[") {
$this->parseCData = true;
return true;
}
if ($data == "]]>" && $this->parseCData) {
$this->parseCData = false;
return true;
}
if ($data == "<!DOCTYPE") {
$this->parsedDTD .= $data;
xml_set_default_handler($parser, "handleDTD");
return true;
}
return false;
}
/**
* Displays errors, which occur while parsing.
*
* @private
* @returns void
*/
function displayError($message) {
if (func_num_args() > 1) {
$arguments = func_get_args();
$command = "\$message = sprintf(\$message, ";
for ( $i = 1; $i < sizeof($arguments); $i++ ) {
$command .= "\$arguments[".$i."], ";
}
$command = eregi_replace(", $", ");", $command);
eval($command);
}
echo "<strong>phpXD error:</strong> ".$message;
exit;
}
}
?>
|
|
From: Thomas D. <th...@us...> - 2002-01-25 22:18:20
|
Update of /cvsroot/phpxd/phpXD/include In directory usw-pr-cvs1:/tmp/cvs-serv12964/include Removed Files: attr.php cdatasection.php characterdata.php comment.php document.php documentfragment.php documenttype.php domexception.php domimplementation.php element.php entity.php entityreference.php namednodemap.php node.php nodelist.php processinginstruction.php text.php Log Message: --- attr.php DELETED --- --- cdatasection.php DELETED --- --- characterdata.php DELETED --- --- comment.php DELETED --- --- document.php DELETED --- --- documentfragment.php DELETED --- --- documenttype.php DELETED --- --- domexception.php DELETED --- --- domimplementation.php DELETED --- --- element.php DELETED --- --- entity.php DELETED --- --- entityreference.php DELETED --- --- namednodemap.php DELETED --- --- node.php DELETED --- --- nodelist.php DELETED --- --- processinginstruction.php DELETED --- --- text.php DELETED --- |
|
From: Thomas D. <th...@us...> - 2002-01-25 22:18:20
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv12964
Modified Files:
phpXD.php sample.php
Log Message:
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.23
retrieving revision 1.24
diff -C2 -r1.23 -r1.24
*** phpXD.php 2001/12/01 23:51:12 1.23
--- phpXD.php 2002/01/25 22:18:18 1.24
***************
*** 7,540 ****
// $Id$
! require("include/node.php");
! require("include/attr.php");
! require("include/characterdata.php");
! require("include/comment.php");
! require("include/document.php");
! require("include/documentfragment.php");
! require("include/documenttype.php");
! require("include/domexception.php");
! require("include/domimplementation.php");
! require("include/element.php");
! require("include/entity.php");
! require("include/entityreference.php");
! require("include/namednodemap.php");
! require("include/nodelist.php");
! require("include/processinginstruction.php");
! require("include/text.php");
! require("include/cdatasection.php");
! /**
! * This class offers methods for accessing the nodes of a XML document using
! * the Document Object Model Level 1 (DOM). For parsing the XML files, the PHP
! * XML extension (libexpat) is used. Some interface supports DOM Level 2 yet.
! *
! * @package phpXD
! * @author Thomas Dohmke <th...@do...>
! * @version $Revision$
! */
! class phpXD {
! /**
! * The Document node.
! *
! * @private
! * @type Document
! */
! var $document;
!
! /**
! * The current Element node which is parsed. Only valid while
! * parsing a XML file!
! *
! * @private
! * @type Node
! */
! var $currentNode;
!
! /**
! * The last node which is parsed. Only valid while parsing a XML file!
! *
! * @private
! * @type Node
! */
! var $lastNode;
!
! /**
! * A CDataSection is parsed. All strings will be collected to one
! * CDataSection node. Only valid while parsing a XML file!
! *
! * @private
! * @type boolean
! */
! var $parseCData = false;
!
! /**
! * The parsed DTD string. Only valid while parsing a XML file!
! *
! * @private
! * @type string
! */
! var $parsedDTD = false;
!
! /**
! * The parsed DTD is an internal DTD. Only valid while parsing
! * a XML file!
! *
! * @private
! * @type boolean
! */
! var $parsedDTDInternal = false;
!
! /**
! * A array with the defined namespaces.
! *
! * @private
! * @type array
! */
! var $namespaces = false;
!
! /**
! * The Constructor of the class. If $file is set, the XML file
! * is loaded.
! *
! * @public
! * @param $file <code>string</code>
! * @returns phpXD
! */
! function phpXD($file = "") {
! $this->namespaces["xml"] = "http://www.w3.org/XML/1998/namespace";
! $this->namespaces["xmlns"] = "http://www.w3.org/2000/xmlns/";
!
! if (!empty($file)) {
! $this->loadFile($file);
! }
! }
!
! /**
! * Loads the XML file specified by $file and creates the DOM tree.
! *
! * @public
! * @param $file <code>string</code>
! * @returns phpXD
! */
! function loadFile($file) {
! if (file_exists($file)) { // && is_readable($file)) {
! $content = implode("", file($file));
!
! if (!empty($content)) {
! $this->document = new Document();
!
! $parser = xml_parser_create();
!
! xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
!
! xml_set_object($parser, $this);
!
! xml_set_element_handler($parser, "handleStartElement",
! "handleEndElement");
! xml_set_character_data_handler($parser, "handleCharacterData");
! xml_set_processing_instruction_handler($parser,
! "handleProcessingInstruction");
! xml_set_default_handler($parser, "handleDefault");
!
! if (!xml_parse($parser, $content, true)) {
! $this->displayError("XML error in file %s, line %d: %s",
! $file, xml_get_current_line_number($parser),
! xml_error_string(xml_get_error_code($parser)));
! }
!
! xml_parser_free($parser);
! }
! }
! else {
! $this->displayError("File %s could not be found or read.", $file);
! }
! }
!
! /**
! * Saves the DOM tree recursively to the XML file specified by $file.
! * If $trim is set to true, all whitespaces from beginning and end of a
! * the XML markup are stripped.
! *
! * @public
! * @param $dom <a href="Document.html">Document</a>
! * @param $trim <code>boolean</code>
! * @returns void
! */
! function saveFile($file, $trim = false) {
! $fp = fopen($file, "w");
! fwrite($fp, "<?xml version=\"1.0\"?>\n");
! $this->saveTree($this->document, 0, $trim, $text);
! fwrite($fp, $text);
! fclose($fp);
! }
!
! /**
! * Writes the DOM tree recursively to the string $text as XML.
! *
! * @private
! * @param $dom <a href="Document.html">Document</a>
! * @param $deep <code>boolean</code>
! * @param $trim <code>boolean</code>
! * @param $text <code>string</code>
! * @returns void
! */
! function saveTree(&$dom, $deep, $trim, &$text) {
! $space = "";
! if (!$trim) {
! for ($i = 0; $i < $deep; $i++) $space .= "\t";
! }
! if ($dom->nodeType == CDATA_SECTION_NODE) {
! $text .= $space;
! $text .= "<![CDATA[";
! $output = $dom->getData();
! $text .= $output;
! $text .= "]]>\n";
! }
! if ($dom->nodeType == COMMENT_NODE) {
! $text .= $space;
! $text .= "<!--";
! $output = $dom->getData();
! if (!(strpos($output, "\n") === false)) {
! $break = "\n";
! }
! else {
! $break = "";
! $space = "";
! }
! $text .= $break.$space;
! $output = str_replace("\n", "\n".$space, $output);
! $text .= $output;
! $text .= $break.$space;
! $text .= "-->\n";
! }
! if ($dom->nodeType == DOCUMENT_NODE) {
! if (!empty($dom->doctype)) {
! if (!empty($dom->doctype->publicId) &&
! !empty($dom->doctype->systemId)) {
! $text .= "<!DOCTYPE ".$dom->doctype->name." PUBLIC ".
! $dom->doctype->systemId." ".$dom->doctype->publicId.">\n";
! }
! else {
! if (!empty($dom->doctype->systemId)) {
! $text .= "<!DOCTYPE ".$dom->doctype->name." SYSTEM ".
! $dom->doctype->systemId.">\n";
! }
! else {
! $text .= $dom->doctype->internalSubset."\n";
! }
! }
! }
! if ($dom->hasChildNodes()) {
! $this->saveTree($dom->firstChild, $deep, $trim, $text);
! }
! $this->saveTree($dom->documentElement, $deep, $trim, $text);
! }
! if ($dom->nodeType == DOCUMENT_FRAGMENT_NODE) {
! $this->saveTree($dom->firstChild, $trim, $text);
! }
! if ($dom->nodeType == ELEMENT_NODE) {
! $text .= $space;
! $text .= "<".$dom->tagName;
! if (isset($dom->attributes)) {
! for ($i = 0; $i < $dom->attributes->getLength(); $i++) {
! $elem =& $dom->attributes->item($i);
! $text .= " ".$elem->getName()."=\"".$elem->getValue()."\"";
! }
! }
!
! if ($dom->hasChildNodes()) {
! $text .= ">\n";
! $this->saveTree($dom->firstChild, $deep+1, $trim, $text);
! $text .= $space;
! $text .= "</".$dom->tagName.">\n";
! }
! else {
! $text .= " />\n";
! }
! }
! if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) {
! $text .= $space;
! $output = $dom->getData();
! $text .= "<?".$dom->getTarget()." ";
! $text .= $output;
! $text .= " ?>\n"; // <?
! }
! if ($dom->nodeType == TEXT_NODE) {
! $text .= $space;
! $text .= $dom->getData();
! $text .= "\n";
! }
! if (isset($dom->nextSibling)) {
! $this->saveTree($dom->nextSibling, $deep, $trim, $text);
! }
! }
!
! /**
! * The Element Start Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleStartElement($parser, $name, $attributes) {
! if (!(strpos($name, ":") === false)) {
! $prefix = substr($name, 0, strpos($name, ":"));
! if (is_array($attributes) &&
! !empty($attributes["xmlns:".$prefix])) {
! $namespace = $attributes["xmlns:".$prefix];
! }
! else {
! if (is_array($this->namespaces) &&
! !empty($this->namespaces[$prefix])) {
! $namespace = $this->namespaces[$prefix];
! }
! else {
! $this->displayError("XML error: unknown namespace in line %d.",
! xml_get_current_line_number($parser));
! }
! }
!
! $this->namespaces[$prefix] = $namespace;
! }
!
! if (!(strpos($name, ":") === false)) {
! $newChild =& $this->document->createElementNS($namespace, $name);
!
! if ($newChild == NAME_SPACE_ERR) {
! $this->displayError("XML error: namespace not valid in line %d.",
! xml_get_current_line_number($parser));
! }
! }
! else {
! $newChild =& $this->document->createElement($name);
! }
!
! if (!isset($this->document->documentElement)) {
! $this->document->documentElement =& $newChild;
! $this->currentNode =& $this->document->documentElement;
! }
! else {
! $this->currentNode->appendChild($newChild);
! $this->currentNode =& $newChild;
! }
!
! if (is_array($attributes)) {
! while (list($name, $value) = each($attributes)) {
! if (!(strpos($name, ":") === false)) {
! $prefix = substr($name, 0, strpos($name, ":"));
! $localName = substr($name, strpos($this->nodeName, ":")+1);
! if ($prefix == "xmlns") {
! $this->namespaces[$localName] = $value;
! $namespace = $this->namespaces["xmlns"];
! }
! else {
! if (is_array($attributes) &&
! !empty($attributes["xmlns:".$prefix])) {
! $namespace = $attributes["xmlns:".$prefix];
! }
! else {
! if (is_array($this->namespaces) &&
! !empty($this->namespaces[$prefix])) {
! $namespace = $this->namespaces[$prefix];
! }
! else {
! $this->displayError("XML error: unknown namespace".
! " in line %d.",
! xml_get_current_line_number($parser));
! }
! }
! }
!
! $result = $this->currentNode->setAttributeNS($namespace, $name,
! $value);
!
! if ($result == NAME_SPACE_ERR) {
! $this->displayError("XML error: namespace not valid in line %d.",
! xml_get_current_line_number($parser));
! }
!
! $attr =& $this->currentNode->getAttributeNode($name);
! $attr->specified = true;
! }
! else {
! $this->currentNode->setAttribute($name, $value);
! $attr =& $this->currentNode->getAttributeNode($name);
! $attr->specified = true;
! }
! }
! }
!
! $this->lastNode =& $this->currentNode;
! }
!
! /**
! * The Element End Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleEndElement($parser, $name) {
! $this->currentNode =& $this->currentNode->parentNode;
! $this->lastNode =& $this->currentNode;
! }
!
! /**
! * The CharacterData Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleCharacterData($parser, $text) {
! if ($this->parseCData) {
! if ($this->lastNode->nodeType == CDATA_SECTION_NODE) {
! $this->lastNode->appendData($text);
! }
! else {
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createCDataSection($text));
! }
! }
! else {
! $text = str_replace("\t", " ", $text);
! $text = str_replace("\n", " ", $text);
! $text = str_replace("\r", " ", $text);
! $text = str_replace(" ", " ", $text);
! $text = preg_replace("/\ +/", " ", $text);
!
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createTextNode($text));
! }
! }
!
! /**
! * The ProcessingInstruction Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleProcessingInstruction($parser, $target, $data) {
! if (!isset($this->document->documentElement)) {
! $this->document->appendChild(
! $this->document->createProcessingInstruction($target, $data));
! }
! else {
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createProcessingInstruction(
! $target, $data));
! }
! }
!
! /**
! * The DTD Handler. Expat has no DTD Handler callback, so this
! * is set by handleDefault.
! *
! * @private
! * @returns void
! */
! function handleDTD($parser, $data) {
! $data = trim($data);
!
! if (!empty($data)) {
! $this->parsedDTD .= " ".$data;
! }
! if ($data == "[") {
! $this->parseDTDInternal = true;
! }
! if ($data == "]") {
! $this->parseDTDInternal = false;
! }
! if ((substr($this->parsedDTD, strlen($this->parsedDTD)-1) == ">") &&
! !$this->parseDTDInternal) {
! $this->document->doctype = new DocumentType();
!
! // this is just a hack to differ between internal and external DTDs
! $DTD = explode(" ", $this->parsedDTD);
!
! $this->document->doctype->name = $DTD[1];
! if ($DTD[2] == "SYSTEM") {
! $this->document->doctype->systemId = $DTD[3];
! }
! else {
! if ($DTD[2] == "PUBLIC") {
! $this->document->doctype->publicId = $DTD[3];
! $this->document->doctype->systemId = $DTD[4];
! }
! else {
! $this->document->doctype->internalSubset = $this->parsedDTD;
! }
! }
!
! xml_set_default_handler($parser, "handleDefault");
! return true;
! }
! }
!
! /**
! * The Default Handler for Expat.
! *
! * @private
! * @returns void
! */
! function handleDefault($parser, $data) {
! $data = trim($data);
!
! if (!(strpos($data, "<!--") === false)) {
! $data = str_replace("<!--", "", $data);
! $data = str_replace("-->", "", $data);
! if (!isset($this->document->documentElement)) {
! $this->document->appendChild(
! $this->document->createComment($data));
! }
! else {
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createComment($data));
! }
! return true;
! }
!
! if ($data == "<![CDATA[") {
! $this->parseCData = true;
! return true;
! }
!
! if ($data == "]]>" && $this->parseCData) {
! $this->parseCData = false;
! return true;
! }
!
! if ($data == "<!DOCTYPE") {
! $this->parsedDTD .= $data;
! xml_set_default_handler($parser, "handleDTD");
! return true;
! }
!
! return false;
! }
!
! /**
! * Displays errors, which occur while parsing.
! *
! * @private
! * @returns void
! */
! function displayError($message) {
! if (func_num_args() > 1) {
! $arguments = func_get_args();
!
! $command = "\$message = sprintf(\$message, ";
!
! for ( $i = 1; $i < sizeof($arguments); $i++ ) {
! $command .= "\$arguments[".$i."], ";
! }
!
! $command = eregi_replace(", $", ");", $command);
!
! eval($command);
! }
!
! echo "<strong>phpXD error:</strong> ".$message;
! exit;
! }
!
! }
! ?>
--- 7,29 ----
// $Id$
! $path = "";
! require($path."include/dom/Node.php");
! require($path."include/dom/Attr.php");
! require($path."include/dom/CharacterData.php");
! require($path."include/dom/Comment.php");
! require($path."include/dom/Document.php");
! require($path."include/dom/DocumentFragment.php");
! require($path."include/dom/DocumentType.php");
! require($path."include/dom/DOMException.php");
! require($path."include/dom/DOMImplementation.php");
! require($path."include/dom/Element.php");
! require($path."include/dom/Entity.php");
! require($path."include/dom/EntityReference.php");
! require($path."include/dom/NamedNodeMap.php");
! require($path."include/dom/NodeList.php");
! require($path."include/dom/ProcessingInstruction.php");
! require($path."include/dom/Text.php");
! require($path."include/dom/CDataSection.php");
! require($path."include/parser/DOMParser.php");
! ?>
\ No newline at end of file
Index: sample.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/sample.php,v
retrieving revision 1.6
retrieving revision 1.7
diff -C2 -r1.6 -r1.7
*** sample.php 2002/01/25 21:44:40 1.6
--- sample.php 2002/01/25 22:18:18 1.7
***************
*** 152,156 ****
}
! $dom = new phpXD("sample.xml");
! echoTree($dom->document);
?>
--- 152,156 ----
}
! $parser = new DOMParser();
! echoTree($parser->parseFile("sample.xml"));
?>
|
|
From: Thomas D. <th...@us...> - 2002-01-25 22:16:35
|
Update of /cvsroot/phpxd/phpXD/include/parser In directory usw-pr-cvs1:/tmp/cvs-serv12544/include/parser Log Message: Directory /cvsroot/phpxd/phpXD/include/parser added to the repository |
|
From: Thomas D. <th...@us...> - 2002-01-25 22:16:35
|
Update of /cvsroot/phpxd/phpXD/include/dom In directory usw-pr-cvs1:/tmp/cvs-serv12544/include/dom Log Message: Directory /cvsroot/phpxd/phpXD/include/dom added to the repository |
|
From: Thomas D. <th...@us...> - 2002-01-25 21:44:43
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv3322
Modified Files:
sample.php
Log Message:
Index: sample.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/sample.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** sample.php 2001/12/01 23:51:12 1.5
--- sample.php 2002/01/25 21:44:40 1.6
***************
*** 152,156 ****
}
! $dom = new phpXD("test.xml");
echoTree($dom->document);
?>
--- 152,156 ----
}
! $dom = new phpXD("sample.xml");
echoTree($dom->document);
?>
|
|
From: Thomas D. <th...@us...> - 2001-12-01 23:51:16
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv22984
Modified Files:
phpXD.php sample.php
Log Message:
Fixed some warnings, i.e. some deprecated calls which cause a warning if
allow_call_time_pass_reference=off.
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.22
retrieving revision 1.23
diff -C2 -r1.22 -r1.23
*** phpXD.php 2001/11/29 20:37:29 1.22
--- phpXD.php 2001/12/01 23:51:12 1.23
***************
*** 67,71 ****
* @type boolean
*/
! var $parseCData;
/**
--- 67,71 ----
* @type boolean
*/
! var $parseCData = false;
/**
***************
*** 75,79 ****
* @type string
*/
! var $parsedDTD;
/**
--- 75,79 ----
* @type string
*/
! var $parsedDTD = false;
/**
***************
*** 119,123 ****
*/
function loadFile($file) {
! if (file_exists($file) && is_readable($file)) {
$content = implode("", file($file));
--- 119,123 ----
*/
function loadFile($file) {
! if (file_exists($file)) { // && is_readable($file)) {
$content = implode("", file($file));
***************
*** 129,133 ****
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
! xml_set_object($parser, &$this);
xml_set_element_handler($parser, "handleStartElement",
--- 129,133 ----
xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
! xml_set_object($parser, $this);
xml_set_element_handler($parser, "handleStartElement",
***************
*** 165,169 ****
$fp = fopen($file, "w");
fwrite($fp, "<?xml version=\"1.0\"?>\n");
! $this->saveTree($this->document, 0, $trim, &$text);
fwrite($fp, $text);
fclose($fp);
--- 165,169 ----
$fp = fopen($file, "w");
fwrite($fp, "<?xml version=\"1.0\"?>\n");
! $this->saveTree($this->document, 0, $trim, $text);
fwrite($fp, $text);
fclose($fp);
Index: sample.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/sample.php,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -r1.4 -r1.5
*** sample.php 2001/11/26 21:27:36 1.4
--- sample.php 2001/12/01 23:51:12 1.5
***************
*** 119,125 ****
}
if ($dom->nodeType == TEXT_NODE) {
! echo $space;
! echo htmlspecialchars($dom->getData());
! echo "<br />";
}
if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) {
--- 119,129 ----
}
if ($dom->nodeType == TEXT_NODE) {
! if (trim($dom->getData()) != "") {
! echo $space;
! }
! echo htmlspecialchars(trim($dom->getData()));
! if (trim($dom->getData()) != "") {
! echo "<br />";
! }
}
if ($dom->nodeType == PROCESSING_INSTRUCTION_NODE) {
***************
*** 148,152 ****
}
! $dom = new phpXD("sample.xml");
echoTree($dom->document);
?>
--- 152,156 ----
}
! $dom = new phpXD("test.xml");
echoTree($dom->document);
?>
|
|
From: Thomas D. <th...@us...> - 2001-12-01 23:49:32
|
Update of /cvsroot/phpxd/phpXD/include
In directory usw-pr-cvs1:/tmp/cvs-serv22113/include
Modified Files:
node.php nodelist.php
Log Message:
Fixed some warnings, i.e. some deprecated calls which cause a warning if
allow_call_time_pass_reference=off.
Index: node.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/include/node.php,v
retrieving revision 1.5
retrieving revision 1.6
diff -C2 -r1.5 -r1.6
*** node.php 2001/11/27 20:58:25 1.5
--- node.php 2001/12/01 23:49:29 1.6
***************
*** 400,404 ****
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild(&$newChild);
}
--- 400,404 ----
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild($newChild);
}
***************
*** 535,539 ****
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild(&$newChild);
}
--- 535,539 ----
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild($newChild);
}
***************
*** 557,561 ****
$newChild->nextSibling = &$child;
$child->previousSibling = &$newChild;
! $this->childNodes->insertNode(&$newChild, $i);
return $newChild;
}
--- 557,561 ----
$newChild->nextSibling = &$child;
$child->previousSibling = &$newChild;
! $this->childNodes->insertNode($newChild, $i);
return $newChild;
}
***************
*** 566,570 ****
$this->lastChild = &$this->firstChild;
$this->childNodes = new NodeList();
! $this->childNodes->insertNode(&$newChild);
return $newChild;
}
--- 566,570 ----
$this->lastChild = &$this->firstChild;
$this->childNodes = new NodeList();
! $this->childNodes->insertNode($newChild);
return $newChild;
}
***************
*** 574,578 ****
$newChild->previousSibling = &$this->lastChild;
$this->lastChild = &$newChild;
! $this->childNodes->insertNode(&$newChild);
return $newChild;
}
--- 574,578 ----
$newChild->previousSibling = &$this->lastChild;
$this->lastChild = &$newChild;
! $this->childNodes->insertNode($newChild);
return $newChild;
}
***************
*** 648,652 ****
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild(&$newChild);
}
--- 648,652 ----
if (isset($newChild->parentNode)) {
! $result = $newChild->parentNode->removeChild($newChild);
}
***************
*** 673,677 ****
$this->lastChild = &$newChild;
}
! $this->childNodes->replaceNode(&$newChild, $i);
return $oldChild;
}
--- 673,677 ----
$this->lastChild = &$newChild;
}
! $this->childNodes->replaceNode($newChild, $i);
return $oldChild;
}
***************
*** 854,858 ****
}
! if ($this->nodeType == ATTR_NODE) {
if (($child->nodeType != ENTITY_REFERENCE_NODE) &&
($child->nodeType != TEXT_NODE)) {
--- 854,858 ----
}
! if ($this->nodeType == ATTRIBUTE_NODE) {
if (($child->nodeType != ENTITY_REFERENCE_NODE) &&
($child->nodeType != TEXT_NODE)) {
***************
*** 871,875 ****
if (($this->nodeType == DOCUMENT_FRAGMENT_NODE) ||
! ($this->nodeType == ENTITY_REFERNCE_NODE) ||
($this->nodeType == ENTITY_NODE) ||
($this->nodeType == ELEMENT_NODE)) {
--- 871,875 ----
if (($this->nodeType == DOCUMENT_FRAGMENT_NODE) ||
! ($this->nodeType == ENTITY_REFERENCE_NODE) ||
($this->nodeType == ENTITY_NODE) ||
($this->nodeType == ELEMENT_NODE)) {
Index: nodelist.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/include/nodelist.php,v
retrieving revision 1.2
retrieving revision 1.3
diff -C2 -r1.2 -r1.3
*** nodelist.php 2001/11/27 20:32:34 1.2
--- nodelist.php 2001/12/01 23:49:29 1.3
***************
*** 30,34 ****
* @type int
*/
! var $length;
/**
--- 30,34 ----
* @type int
*/
! var $length = 0;
/**
|
|
From: Thomas D. <th...@us...> - 2001-11-29 20:37:33
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv11347
Modified Files:
phpXD.php
Log Message:
Bug in handleCharacterData fixed. Textnodes with only spaces were ignored.
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.21
retrieving revision 1.22
diff -C2 -r1.21 -r1.22
*** phpXD.php 2001/11/27 21:29:36 1.21
--- phpXD.php 2001/11/29 20:37:29 1.22
***************
*** 400,408 ****
$text = str_replace("\r", " ", $text);
$text = str_replace(" ", " ", $text);
!
! if (trim($text) != "") {
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createTextNode($text));
! }
}
}
--- 400,407 ----
$text = str_replace("\r", " ", $text);
$text = str_replace(" ", " ", $text);
! $text = preg_replace("/\ +/", " ", $text);
!
! $this->lastNode =& $this->currentNode->appendChild(
! $this->document->createTextNode($text));
}
}
|
|
From: Thomas D. <th...@us...> - 2001-11-27 21:29:39
|
Update of /cvsroot/phpxd/phpXD
In directory usw-pr-cvs1:/tmp/cvs-serv13987
Modified Files:
phpXD.php
Log Message:
Index: phpXD.php
===================================================================
RCS file: /cvsroot/phpxd/phpXD/phpXD.php,v
retrieving revision 1.20
retrieving revision 1.21
diff -C2 -r1.20 -r1.21
*** phpXD.php 2001/11/27 20:56:40 1.20
--- phpXD.php 2001/11/27 21:29:36 1.21
***************
*** 386,393 ****
*/
function handleCharacterData($parser, $text) {
- if (trim($text) == "") {
- return;
- }
-
if ($this->parseCData) {
if ($this->lastNode->nodeType == CDATA_SECTION_NODE) {
--- 386,389 ----
***************
*** 439,445 ****
function handleDTD($parser, $data) {
$data = trim($data);
- if ($data == "") {
- return;
- }
if (!empty($data)) {
--- 435,438 ----
***************
*** 486,492 ****
function handleDefault($parser, $data) {
$data = trim($data);
- if ($data == "") {
- return;
- }
if (!(strpos($data, "<!--") === false)) {
--- 479,482 ----
|
Update of /cvsroot/phpxd/phpXD/doc In directory usw-pr-cvs1:/tmp/cvs-serv4879/doc Added Files: Attr.html CDataSection.html CharacterData.html Comment.html DOMImplementation.html Document.html DocumentFragment.html DocumentType.html Element.html Entity.html EntityReference.html NamedNodeMap.html Node.html NodeList.html ProcessingInstruction.html Text.html allclasses-frame.html deprecated-list.html help-doc.html index-all.html index.html overview-tree.html package-list packages.html phpXD.html serialized-form.html stylesheet.css Log Message: Documentation created with PHPDoc (see http://www.callowayprints.com/phpdoc). --- NEW FILE: Attr.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Nov 27 21:59:22 CET 2001 --> <TITLE> : Class Attr </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="CDataSection.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Attr.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class Attr</H2> <PRE> <A HREF="Node.html">Node</A> | +--<B>Attr</B> </PRE> <HR> <DL> <DT>public class <B>Attr</B><DT>extends <A HREF="Node.html">Node</A></DL> <P> Class representing the DOM Attr interface. <P> <DL> <DT><B>Version: </B><DD>$Revision: 1.1 $</DD> <DT><B>Author: </B><DD>Thomas Dohmke <th...@do...></DD> </DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private string</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#$name">$name</A></B></CODE> <BR> The name of the attribute.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private <A HREF="Node.html">Node</A></CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#$ownerElement">$ownerElement</A></B></CODE> <BR> A link to the Element object that owns this attribute.<br> DOM-Level 2</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#$specified">$specified</A></B></CODE> <BR> If this attribute was explicity set in the XML source for the parent element or it is a default value in the DTD (currently not supported by phpXD) specified is true.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private string</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#$value">$value</A></B></CODE> <BR> The value of the attribute.<br> DOM-Level 1</TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#$attributes">$attributes</A>, <A HREF="Node.html#$childNodes">$childNodes</A>, <A HREF="Node.html#$firstChild">$firstChild</A>, <A HREF="Node.html#$lastChild">$lastChild</A>, <A HREF="Node.html#$localName">$localName</A>, <A HREF="Node.html#$namespaceURI">$namespaceURI</A>, <A HREF="Node.html#$nextSibling">$nextSibling</A>, <A HREF="Node.html#$nodeID">$nodeID</A>, <A HREF="Node.html#$nodeName">$nodeName</A>, <A HREF="Node.html#$nodeType">$nodeType</A>, <A HREF="Node.html#$nodeValue">$nodeValue</A>, <A HREF="Node.html#$ownerDocument">$ownerDocument</A>, <A HREF="Node.html#$parentNode">$parentNode</A>, <A HREF="Node.html#$prefix">$prefix</A>, <A HREF="Node.html#$previousSibling">$previousSibling</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="Attr.html#Attr()">Attr</A></B>()</CODE> <BR> Constructor of the class.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> NOT_SUPPORTED_ERR</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#appendChild(var)">appendChild</A></B>(var $newChild)</CODE> <BR> This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#getName()">getName</A></B>()</CODE> <BR> Returns the name of the attribute.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> <A HREF="Node.html">Node</A></CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#getOwnerElement()">getOwnerElement</A></B>()</CODE> <BR> Returns a reference to the owner of the attribute.<br> DOM-Level 2</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> boolean</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#getSpecified()">getSpecified</A></B>()</CODE> <BR> Returns true if the attribute was set explicity in the XML Source or in the DTD (not supported).<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#getValue()">getValue</A></B>()</CODE> <BR> Return the value of the attribute.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> NOT_SUPPORTED_ERR</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#insertBefore(var, var)">insertBefore</A></B>(var $newChild, var $refChild)</CODE> <BR> This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> NOT_SUPPORTED_ERR</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#replaceChild(var, var)">replaceChild</A></B>(var $newChild, var $oldChild)</CODE> <BR> This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#setNodeValue(var)">setNodeValue</A></B>(var $nodeValue)</CODE> <BR> Sets the value of the attribute (inherited function from Node interface) <br>DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> void</CODE></FONT></TD> <TD><CODE><B><A HREF="Attr.html#setValue(var)">setValue</A></B>(var $value)</CODE> <BR> Sets the value of the attribute<br> DOM-Level 1</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#checkDocument(var)">checkDocument</A>, <A HREF="Node.html#checkHierarchy(var)">checkHierarchy</A>, <A HREF="Node.html#cloneNode(var)">cloneNode</A>, <A HREF="Node.html#getAttributes()">getAttributes</A>, <A HREF="Node.html#getChildNodes()">getChildNodes</A>, <A HREF="Node.html#getFirstChild()">getFirstChild</A>, <A HREF="Node.html#getLastChild()">getLastChild</A>, <A HREF="Node.html#getLocalName()">getLocalName</A>, <A HREF="Node.html#getNamespaceURI()">getNamespaceURI</A>, <A HREF="Node.html#getNextSibling()">getNextSibling</A>, <A HREF="Node.html#getNodeName()">getNodeName</A>, <A HREF="Node.html#getNodeType()">getNodeType</A>, <A HREF="Node.html#getNodeValue()">getNodeValue</A>, <A HREF="Node.html#getOwnerDocument()">getOwnerDocument</A>, <A HREF="Node.html#getParentNode()">getParentNode</A>, <A HREF="Node.html#getPrefix()">getPrefix</A>, <A HREF="Node.html#getPreviousSibling()">getPreviousSibling</A>, <A HREF="Node.html#hasAttributes()">hasAttributes</A>, <A HREF="Node.html#hasChildNodes()">hasChildNodes</A>, <A HREF="Node.html#isSupported(var, var)">isSupported</A>, <A HREF="Node.html#normalize()">normalize</A>, <A HREF="Node.html#removeChild(var)">removeChild</A>, <A HREF="Node.html#setPrefix(var)">setPrefix</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="$name"><!-- --></A><H3> $name</H3> <PRE> private string <B>$name</B></PRE> <DL> <DD>The name of the attribute.<br> DOM-Level 1</DL> <HR> <A NAME="$ownerElement"><!-- --></A><H3> $ownerElement</H3> <PRE> private <A HREF="Node.html">Node</A> <B>$ownerElement</B></PRE> <DL> <DD>A link to the Element object that owns this attribute.<br> DOM-Level 2</DL> <HR> <A NAME="$specified"><!-- --></A><H3> $specified</H3> <PRE> private boolean <B>$specified</B></PRE> <DL> <DD>If this attribute was explicity set in the XML source for the parent element or it is a default value in the DTD (currently not supported by phpXD) specified is true.<br> DOM-Level 1</DL> <HR> <A NAME="$value"><!-- --></A><H3> $value</H3> <PRE> private string <B>$value</B></PRE> <DL> <DD>The value of the attribute.<br> DOM-Level 1</DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Attr()"><!-- --></A><H3> Attr</H3> <PRE> public <B>Attr</B>()</PRE> <DL> <DD>Constructor of the class.</DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="getName()"><!-- --></A><H3> getName</H3> <PRE> public string <B>getName</B>()</PRE> <DL> <DD>Returns the name of the attribute.<br> DOM-Level 1</DL> <HR> <A NAME="getOwnerElement()"><!-- --></A><H3> getOwnerElement</H3> <PRE> public <A HREF="Node.html">Node</A> <B>getOwnerElement</B>()</PRE> <DL> <DD>Returns a reference to the owner of the attribute.<br> DOM-Level 2</DL> <HR> <A NAME="getSpecified()"><!-- --></A><H3> getSpecified</H3> <PRE> public boolean <B>getSpecified</B>()</PRE> <DL> <DD>Returns true if the attribute was set explicity in the XML Source or in the DTD (not supported).<br> DOM-Level 1</DL> <HR> <A NAME="getValue()"><!-- --></A><H3> getValue</H3> <PRE> public string <B>getValue</B>()</PRE> <DL> <DD>Return the value of the attribute.<br> DOM-Level 1</DL> <HR> <A NAME="setValue(var)"><!-- --></A><H3> setValue</H3> <PRE> public void <B>setValue</B>(var $value)</PRE> <DL> <DD>Sets the value of the attribute<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$value</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="setNodeValue(var)"><!-- --></A><H3> setNodeValue</H3> <PRE> public void <B>setNodeValue</B>(var $nodeValue)</PRE> <DL> <DD>Sets the value of the attribute (inherited function from Node interface) <br>DOM-Level 1<DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="Node.html#setNodeValue(var)">setNodeValue</A></CODE> in class <CODE><A HREF="Node.html">Node</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>$nodeValue</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="appendChild(var)"><!-- --></A><H3> appendChild</H3> <PRE> public NOT_SUPPORTED_ERR <B>appendChild</B>(var $newChild)</PRE> <DL> <DD>This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1<DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="Node.html#appendChild(var)">appendChild</A></CODE> in class <CODE><A HREF="Node.html">Node</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>$newChild</CODE> - is passed by reference</DL> </DD> </DL> <HR> <A NAME="insertBefore(var, var)"><!-- --></A><H3> insertBefore</H3> <PRE> public NOT_SUPPORTED_ERR <B>insertBefore</B>(var $newChild, var $refChild)</PRE> <DL> <DD>This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1<DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="Node.html#insertBefore(var, var)">insertBefore</A></CODE> in class <CODE><A HREF="Node.html">Node</A></CODE></DL> </DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>$newChild</CODE> - is passed by reference<DD><CODE>$refChild</CODE> - is passed by reference</DL> </DD> </DL> <HR> <A NAME="replaceChild(var, var)"><!-- --></A><H3> replaceChild</H3> <PRE> public NOT_SUPPORTED_ERR <B>replaceChild</B>(var $newChild, var $oldChild)</PRE> <DL> <DD>This inherited function from Node interface is not supported by the Attr interface.<br> DOM-Level 1<DD><DL> <DT><B>Overrides:</B><DD><CODE><A HREF="Node.html#replaceChild(var, var)">replaceChild</A></CODE> in class <CODE><A HREF="Node.html">Node</A></CODE></DL> </DD> <DD>Following copied from class: <CODE>Node</CODE></DD> <DD><DL> <DT><B>Parameters:</B><DD><CODE>$newChild</CODE> - <a href="Node.html">Node</a><DD><CODE>$oldChild</CODE> - <a href="Node.html">Node</a></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> PREV CLASS <A HREF="CDataSection.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Attr.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML> --- NEW FILE: CDataSection.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Nov 27 21:59:22 CET 2001 --> <TITLE> : Class CDataSection </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="Attr.html"><B>PREV CLASS</B></A> <A HREF="CharacterData.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CDataSection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_CharacterData">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_Text">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class CDataSection</H2> <PRE> <A HREF="Node.html">Node</A> | +--<A HREF="CharacterData.html">CharacterData</A> | +--<A HREF="Text.html">Text</A> | +--<B>CDataSection</B> </PRE> <HR> <DL> <DT>public class <B>CDataSection</B><DT>extends <A HREF="Text.html">Text</A></DL> <P> Class representing the DOM CDataSection interface. <P> <DL> <DT><B>Version: </B><DD>$Revision: 1.1 $</DD> <DT><B>Author: </B><DD>Thomas Dohmke <th...@do...></DD> </DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="fields_inherited_from_class_CharacterData"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="CharacterData.html">CharacterData</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="CharacterData.html#$data">$data</A>, <A HREF="CharacterData.html#$length">$length</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#$attributes">$attributes</A>, <A HREF="Node.html#$childNodes">$childNodes</A>, <A HREF="Node.html#$firstChild">$firstChild</A>, <A HREF="Node.html#$lastChild">$lastChild</A>, <A HREF="Node.html#$localName">$localName</A>, <A HREF="Node.html#$namespaceURI">$namespaceURI</A>, <A HREF="Node.html#$nextSibling">$nextSibling</A>, <A HREF="Node.html#$nodeID">$nodeID</A>, <A HREF="Node.html#$nodeName">$nodeName</A>, <A HREF="Node.html#$nodeType">$nodeType</A>, <A HREF="Node.html#$nodeValue">$nodeValue</A>, <A HREF="Node.html#$ownerDocument">$ownerDocument</A>, <A HREF="Node.html#$parentNode">$parentNode</A>, <A HREF="Node.html#$prefix">$prefix</A>, <A HREF="Node.html#$previousSibling">$previousSibling</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="CDataSection.html#CDataSection()">CDataSection</A></B>()</CODE> <BR> Constructor of the class.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="methods_inherited_from_class_Text"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="Text.html">Text</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Text.html#splitText(var)">splitText</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_CharacterData"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="CharacterData.html">CharacterData</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="CharacterData.html#appendData(var)">appendData</A>, <A HREF="CharacterData.html#deleteData(var, var)">deleteData</A>, <A HREF="CharacterData.html#getData()">getData</A>, <A HREF="CharacterData.html#getLength()">getLength</A>, <A HREF="CharacterData.html#insertData(var, var)">insertData</A>, <A HREF="CharacterData.html#replaceData(var, var, var)">replaceData</A>, <A HREF="CharacterData.html#setData(var)">setData</A>, <A HREF="CharacterData.html#substringData(var, var)">substringData</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#appendChild(var)">appendChild</A>, <A HREF="Node.html#checkDocument(var)">checkDocument</A>, <A HREF="Node.html#checkHierarchy(var)">checkHierarchy</A>, <A HREF="Node.html#cloneNode(var)">cloneNode</A>, <A HREF="Node.html#getAttributes()">getAttributes</A>, <A HREF="Node.html#getChildNodes()">getChildNodes</A>, <A HREF="Node.html#getFirstChild()">getFirstChild</A>, <A HREF="Node.html#getLastChild()">getLastChild</A>, <A HREF="Node.html#getLocalName()">getLocalName</A>, <A HREF="Node.html#getNamespaceURI()">getNamespaceURI</A>, <A HREF="Node.html#getNextSibling()">getNextSibling</A>, <A HREF="Node.html#getNodeName()">getNodeName</A>, <A HREF="Node.html#getNodeType()">getNodeType</A>, <A HREF="Node.html#getNodeValue()">getNodeValue</A>, <A HREF="Node.html#getOwnerDocument()">getOwnerDocument</A>, <A HREF="Node.html#getParentNode()">getParentNode</A>, <A HREF="Node.html#getPrefix()">getPrefix</A>, <A HREF="Node.html#getPreviousSibling()">getPreviousSibling</A>, <A HREF="Node.html#hasAttributes()">hasAttributes</A>, <A HREF="Node.html#hasChildNodes()">hasChildNodes</A>, <A HREF="Node.html#insertBefore(var, var)">insertBefore</A>, <A HREF="Node.html#isSupported(var, var)">isSupported</A>, <A HREF="Node.html#normalize()">normalize</A>, <A HREF="Node.html#removeChild(var)">removeChild</A>, <A HREF="Node.html#replaceChild(var, var)">replaceChild</A>, <A HREF="Node.html#setNodeValue(var)">setNodeValue</A>, <A HREF="Node.html#setPrefix(var)">setPrefix</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="CDataSection()"><!-- --></A><H3> CDataSection</H3> <PRE> public <B>CDataSection</B>()</PRE> <DL> <DD>Constructor of the class.</DL> <!-- ============ METHOD DETAIL ========== --> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="Attr.html"><B>PREV CLASS</B></A> <A HREF="CharacterData.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CDataSection.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_CharacterData">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_Text">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML> --- NEW FILE: CharacterData.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Nov 27 21:59:22 CET 2001 --> <TITLE> : Class CharacterData </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="CDataSection.html"><B>PREV CLASS</B></A> <A HREF="Comment.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CharacterData.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class CharacterData</H2> <PRE> <A HREF="Node.html">Node</A> | +--<B>CharacterData</B> </PRE> <DL> <DT><B>Direct Known Subclasses:</B> <DD><A HREF="Comment.html">Comment</A>, <A HREF="Text.html">Text</A></DD> </DL> <HR> <DL> <DT>public class <B>CharacterData</B><DT>extends <A HREF="Node.html">Node</A></DL> <P> Class representing the DOM CharacterData interface. <P> <DL> <DT><B>Version: </B><DD>$Revision: 1.1 $</DD> <DT><B>Author: </B><DD>Thomas Dohmke <th...@do...></DD> </DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="field_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Field Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#$data">$data</A></B></CODE> <BR> The "raw" data of the CharacterData node.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE>private int</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#$length">$length</A></B></CODE> <BR> The size of the string stored in data.<br> DOM-Level 1</TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#$attributes">$attributes</A>, <A HREF="Node.html#$childNodes">$childNodes</A>, <A HREF="Node.html#$firstChild">$firstChild</A>, <A HREF="Node.html#$lastChild">$lastChild</A>, <A HREF="Node.html#$localName">$localName</A>, <A HREF="Node.html#$namespaceURI">$namespaceURI</A>, <A HREF="Node.html#$nextSibling">$nextSibling</A>, <A HREF="Node.html#$nodeID">$nodeID</A>, <A HREF="Node.html#$nodeName">$nodeName</A>, <A HREF="Node.html#$nodeType">$nodeType</A>, <A HREF="Node.html#$nodeValue">$nodeValue</A>, <A HREF="Node.html#$ownerDocument">$ownerDocument</A>, <A HREF="Node.html#$parentNode">$parentNode</A>, <A HREF="Node.html#$prefix">$prefix</A>, <A HREF="Node.html#$previousSibling">$previousSibling</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="CharacterData.html#CharacterData()">CharacterData</A></B>()</CODE> <BR> Constructor of the class.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="method_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Method Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#appendData(var)">appendData</A></B>(var $arg)</CODE> <BR> Appends contents of the arg parameter to the current contents of the data attribute.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#deleteData(var, var)">deleteData</A></B>(var $offset, var $count)</CODE> <BR> Truncates the data attribute; It removes count characters, starting at the offset position.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#getData()">getData</A></B>()</CODE> <BR> Returns the data stored in this node.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#getLength()">getLength</A></B>()</CODE> <BR> Returns the length of the data stored in this node.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#insertData(var, var)">insertData</A></B>(var $offset, var $arg)</CODE> <BR> Takes a string, splits the data attributes current contents at the given offset, then inserts the string arg between the two substrings.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#replaceData(var, var, var)">replaceData</A></B>(var $offset, var $count, var $arg)</CODE> <BR> Replaces a substring within the data attribute with another string.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#setData(var)">setData</A></B>(var $data)</CODE> <BR> Sets the data stored in this node.<br> DOM-Level 1</TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"> <CODE> string</CODE></FONT></TD> <TD><CODE><B><A HREF="CharacterData.html#substringData(var, var)">substringData</A></B>(var $offset, var $count)</CODE> <BR> Returns a string that contains a subset of the string stored in the data attribute.<br> DOM-Level 1</TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#appendChild(var)">appendChild</A>, <A HREF="Node.html#checkDocument(var)">checkDocument</A>, <A HREF="Node.html#checkHierarchy(var)">checkHierarchy</A>, <A HREF="Node.html#cloneNode(var)">cloneNode</A>, <A HREF="Node.html#getAttributes()">getAttributes</A>, <A HREF="Node.html#getChildNodes()">getChildNodes</A>, <A HREF="Node.html#getFirstChild()">getFirstChild</A>, <A HREF="Node.html#getLastChild()">getLastChild</A>, <A HREF="Node.html#getLocalName()">getLocalName</A>, <A HREF="Node.html#getNamespaceURI()">getNamespaceURI</A>, <A HREF="Node.html#getNextSibling()">getNextSibling</A>, <A HREF="Node.html#getNodeName()">getNodeName</A>, <A HREF="Node.html#getNodeType()">getNodeType</A>, <A HREF="Node.html#getNodeValue()">getNodeValue</A>, <A HREF="Node.html#getOwnerDocument()">getOwnerDocument</A>, <A HREF="Node.html#getParentNode()">getParentNode</A>, <A HREF="Node.html#getPrefix()">getPrefix</A>, <A HREF="Node.html#getPreviousSibling()">getPreviousSibling</A>, <A HREF="Node.html#hasAttributes()">hasAttributes</A>, <A HREF="Node.html#hasChildNodes()">hasChildNodes</A>, <A HREF="Node.html#insertBefore(var, var)">insertBefore</A>, <A HREF="Node.html#isSupported(var, var)">isSupported</A>, <A HREF="Node.html#normalize()">normalize</A>, <A HREF="Node.html#removeChild(var)">removeChild</A>, <A HREF="Node.html#replaceChild(var, var)">replaceChild</A>, <A HREF="Node.html#setNodeValue(var)">setNodeValue</A>, <A HREF="Node.html#setPrefix(var)">setPrefix</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <A NAME="field_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Field Detail</B></FONT></TD> </TR> </TABLE> <A NAME="$data"><!-- --></A><H3> $data</H3> <PRE> private string <B>$data</B></PRE> <DL> <DD>The "raw" data of the CharacterData node.<br> DOM-Level 1</DL> <HR> <A NAME="$length"><!-- --></A><H3> $length</H3> <PRE> private int <B>$length</B></PRE> <DL> <DD>The size of the string stored in data.<br> DOM-Level 1</DL> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="CharacterData()"><!-- --></A><H3> CharacterData</H3> <PRE> public <B>CharacterData</B>()</PRE> <DL> <DD>Constructor of the class.</DL> <!-- ============ METHOD DETAIL ========== --> <A NAME="method_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Method Detail</B></FONT></TD> </TR> </TABLE> <A NAME="getData()"><!-- --></A><H3> getData</H3> <PRE> public string <B>getData</B>()</PRE> <DL> <DD>Returns the data stored in this node.<br> DOM-Level 1</DL> <HR> <A NAME="setData(var)"><!-- --></A><H3> setData</H3> <PRE> public string <B>setData</B>(var $data)</PRE> <DL> <DD>Sets the data stored in this node.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$data</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="getLength()"><!-- --></A><H3> getLength</H3> <PRE> public string <B>getLength</B>()</PRE> <DL> <DD>Returns the length of the data stored in this node.<br> DOM-Level 1</DL> <HR> <A NAME="appendData(var)"><!-- --></A><H3> appendData</H3> <PRE> public string <B>appendData</B>(var $arg)</PRE> <DL> <DD>Appends contents of the arg parameter to the current contents of the data attribute.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$arg</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="deleteData(var, var)"><!-- --></A><H3> deleteData</H3> <PRE> public string <B>deleteData</B>(var $offset, var $count)</PRE> <DL> <DD>Truncates the data attribute; It removes count characters, starting at the offset position.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$offset</CODE> - <code>int</code><DD><CODE>$count</CODE> - <code>int</code></DL> </DD> </DL> <HR> <A NAME="insertData(var, var)"><!-- --></A><H3> insertData</H3> <PRE> public string <B>insertData</B>(var $offset, var $arg)</PRE> <DL> <DD>Takes a string, splits the data attributes current contents at the given offset, then inserts the string arg between the two substrings.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$offset</CODE> - <code>int</code><DD><CODE>$arg</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="replaceData(var, var, var)"><!-- --></A><H3> replaceData</H3> <PRE> public string <B>replaceData</B>(var $offset, var $count, var $arg)</PRE> <DL> <DD>Replaces a substring within the data attribute with another string.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$offset</CODE> - <code>int</code><DD><CODE>$count</CODE> - <code>int</code><DD><CODE>$arg</CODE> - <code>string</code></DL> </DD> </DL> <HR> <A NAME="substringData(var, var)"><!-- --></A><H3> substringData</H3> <PRE> public string <B>substringData</B>(var $offset, var $count)</PRE> <DL> <DD>Returns a string that contains a subset of the string stored in the data attribute.<br> DOM-Level 1<DD><DL> <DT><B>Parameters:</B><DD><CODE>$offset</CODE> - <code>int</code><DD><CODE>$count</CODE> - <code>int</code></DL> </DD> </DL> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="CDataSection.html"><B>PREV CLASS</B></A> <A HREF="Comment.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="CharacterData.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#field_summary">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#method_summary">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: <A HREF="#field_detail">FIELD</A> | <A HREF="#constructor_detail">CONSTR</A> | <A HREF="#method_detail">METHOD</A></FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML> --- NEW FILE: Comment.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Nov 27 21:59:22 CET 2001 --> <TITLE> : Class Comment </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="CharacterData.html"><B>PREV CLASS</B></A> <A HREF="Document.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Comment.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_CharacterData">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_CharacterData">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> <!-- ======== START OF CLASS DATA ======== --> <H2> Class Comment</H2> <PRE> <A HREF="Node.html">Node</A> | +--<A HREF="CharacterData.html">CharacterData</A> | +--<B>Comment</B> </PRE> <HR> <DL> <DT>public class <B>Comment</B><DT>extends <A HREF="CharacterData.html">CharacterData</A></DL> <P> Class representing the DOM Comment interface. <P> <DL> <DT><B>Version: </B><DD>$Revision: 1.1 $</DD> <DT><B>Author: </B><DD>Thomas Dohmke <th...@do...></DD> </DL> <HR> <P> <!-- ======== INNER CLASS SUMMARY ======== --> <!-- =========== FIELD SUMMARY =========== --> <A NAME="fields_inherited_from_class_CharacterData"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="CharacterData.html">CharacterData</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="CharacterData.html#$data">$data</A>, <A HREF="CharacterData.html#$length">$length</A></CODE></TD> </TR> </TABLE> <A NAME="fields_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Fields inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#$attributes">$attributes</A>, <A HREF="Node.html#$childNodes">$childNodes</A>, <A HREF="Node.html#$firstChild">$firstChild</A>, <A HREF="Node.html#$lastChild">$lastChild</A>, <A HREF="Node.html#$localName">$localName</A>, <A HREF="Node.html#$namespaceURI">$namespaceURI</A>, <A HREF="Node.html#$nextSibling">$nextSibling</A>, <A HREF="Node.html#$nodeID">$nodeID</A>, <A HREF="Node.html#$nodeName">$nodeName</A>, <A HREF="Node.html#$nodeType">$nodeType</A>, <A HREF="Node.html#$nodeValue">$nodeValue</A>, <A HREF="Node.html#$ownerDocument">$ownerDocument</A>, <A HREF="Node.html#$parentNode">$parentNode</A>, <A HREF="Node.html#$prefix">$prefix</A>, <A HREF="Node.html#$previousSibling">$previousSibling</A></CODE></TD> </TR> </TABLE> <!-- ======== CONSTRUCTOR SUMMARY ======== --> <A NAME="constructor_summary"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=2><FONT SIZE="+2"> <B>Constructor Summary</B></FONT></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><B><A HREF="Comment.html#Comment()">Comment</A></B>()</CODE> <BR> Constructor of the class.</TD> </TR> </TABLE> <!-- ========== METHOD SUMMARY =========== --> <A NAME="methods_inherited_from_class_CharacterData"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="CharacterData.html">CharacterData</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="CharacterData.html#appendData(var)">appendData</A>, <A HREF="CharacterData.html#deleteData(var, var)">deleteData</A>, <A HREF="CharacterData.html#getData()">getData</A>, <A HREF="CharacterData.html#getLength()">getLength</A>, <A HREF="CharacterData.html#insertData(var, var)">insertData</A>, <A HREF="CharacterData.html#replaceData(var, var, var)">replaceData</A>, <A HREF="CharacterData.html#setData(var)">setData</A>, <A HREF="CharacterData.html#substringData(var, var)">substringData</A></CODE></TD> </TR> </TABLE> <A NAME="methods_inherited_from_class_Node"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"> <TD><B>Methods inherited from class <A HREF="Node.html">Node</A></B></TD> </TR> <TR BGCOLOR="white" CLASS="TableRowColor"> <TD><CODE><A HREF="Node.html#appendChild(var)">appendChild</A>, <A HREF="Node.html#checkDocument(var)">checkDocument</A>, <A HREF="Node.html#checkHierarchy(var)">checkHierarchy</A>, <A HREF="Node.html#cloneNode(var)">cloneNode</A>, <A HREF="Node.html#getAttributes()">getAttributes</A>, <A HREF="Node.html#getChildNodes()">getChildNodes</A>, <A HREF="Node.html#getFirstChild()">getFirstChild</A>, <A HREF="Node.html#getLastChild()">getLastChild</A>, <A HREF="Node.html#getLocalName()">getLocalName</A>, <A HREF="Node.html#getNamespaceURI()">getNamespaceURI</A>, <A HREF="Node.html#getNextSibling()">getNextSibling</A>, <A HREF="Node.html#getNodeName()">getNodeName</A>, <A HREF="Node.html#getNodeType()">getNodeType</A>, <A HREF="Node.html#getNodeValue()">getNodeValue</A>, <A HREF="Node.html#getOwnerDocument()">getOwnerDocument</A>, <A HREF="Node.html#getParentNode()">getParentNode</A>, <A HREF="Node.html#getPrefix()">getPrefix</A>, <A HREF="Node.html#getPreviousSibling()">getPreviousSibling</A>, <A HREF="Node.html#hasAttributes()">hasAttributes</A>, <A HREF="Node.html#hasChildNodes()">hasChildNodes</A>, <A HREF="Node.html#insertBefore(var, var)">insertBefore</A>, <A HREF="Node.html#isSupported(var, var)">isSupported</A>, <A HREF="Node.html#normalize()">normalize</A>, <A HREF="Node.html#removeChild(var)">removeChild</A>, <A HREF="Node.html#replaceChild(var, var)">replaceChild</A>, <A HREF="Node.html#setNodeValue(var)">setNodeValue</A>, <A HREF="Node.html#setPrefix(var)">setPrefix</A></CODE></TD> </TR> </TABLE> <P> <!-- ============ FIELD DETAIL =========== --> <!-- ========= CONSTRUCTOR DETAIL ======== --> <A NAME="constructor_detail"><!-- --></A> <TABLE BORDER="1" CELLPADDING="3" CELLSPACING="0" WIDTH="100%"> <TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"> <TD COLSPAN=1><FONT SIZE="+2"> <B>Constructor Detail</B></FONT></TD> </TR> </TABLE> <A NAME="Comment()"><!-- --></A><H3> Comment</H3> <PRE> public <B>Comment</B>()</PRE> <DL> <DD>Constructor of the class.</DL> <!-- ============ METHOD DETAIL ========== --> <!-- ========= END OF CLASS DATA ========= --> <HR> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_bottom"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_bottom_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="CharacterData.html"><B>PREV CLASS</B></A> <A HREF="Document.html"><B>NEXT CLASS</B></A></FONT></TD> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="index.html" TARGET="_top"><B>FRAMES</B></A> <A HREF="Comment.html" TARGET="_top"><B>NO FRAMES</B></A></FONT></TD> </TR> <TR> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> SUMMARY: INNER | <A HREF="#fields_inherited_from_class_CharacterData">FIELD</A> | <A HREF="#constructor_summary">CONSTR</A> | <A HREF="#methods_inherited_from_class_CharacterData">METHOD</A></FONT></TD> <TD VALIGN="top" CLASS="NavBarCell3"><FONT SIZE="-2"> DETAIL: FIELD | <A HREF="#constructor_detail">CONSTR</A> | METHOD</FONT></TD> </TR> </TABLE> <!-- =========== END OF NAVBAR =========== --> <HR> </BODY> </HTML> --- NEW FILE: DOMImplementation.html --- <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Frameset//EN""http://www.w3.org/TR/REC-html40/frameset.dtd"> <!--NewPage--> <HTML> <HEAD> <!-- Generated by javadoc on Tue Nov 27 21:59:22 CET 2001 --> <TITLE> : Class DOMImplementation </TITLE> <LINK REL ="stylesheet" TYPE="text/css" HREF="stylesheet.css" TITLE="Style"> </HEAD> <BODY BGCOLOR="white"> <!-- ========== START OF NAVBAR ========== --> <A NAME="navbar_top"><!-- --></A> <TABLE BORDER="0" WIDTH="100%" CELLPADDING="1" CELLSPACING="0"> <TR> <TD COLSPAN=2 BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A NAME="navbar_top_firstrow"><!-- --></A> <TABLE BORDER="0" CELLPADDING="0" CELLSPACING="3"> <TR ALIGN="center" VALIGN="top"> <TD BGCOLOR="#FFFFFF" CLASS="NavBarCell1Rev"> <FONT CLASS="NavBarFont1Rev"><B>Class</B></FONT> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="overview-tree.html"><FONT CLASS="NavBarFont1"><B>Tree</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="deprecated-list.html"><FONT CLASS="NavBarFont1"><B>Deprecated</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="index-all.html"><FONT CLASS="NavBarFont1"><B>Index</B></FONT></A> </TD> <TD BGCOLOR="#EEEEFF" CLASS="NavBarCell1"> <A HREF="help-doc.html"><FONT CLASS="NavBarFont1"><B>Help</B></FONT></A> </TD> </TR> </TABLE> </TD> <TD ALIGN="right" VALIGN="top" ROWSPAN=3><EM> </EM> </TD> </TR> <TR> <TD BGCOLOR="white" CLASS="NavBarCell2"><FONT SIZE="-2"> <A HREF="DocumentT... [truncated message content] |
|
From: Thomas D. <th...@us...> - 2001-11-27 21:01:25
|
Update of /cvsroot/phpxd/phpXD/doc In directory usw-pr-cvs1:/tmp/cvs-serv4489/doc Log Message: Directory /cvsroot/phpxd/phpXD/doc added to the repository |