当前位置: 首页>>代码示例>>PHP>>正文


PHP XML_Parser类代码示例

本文整理汇总了PHP中XML_Parser的典型用法代码示例。如果您正苦于以下问题:PHP XML_Parser类的具体用法?PHP XML_Parser怎么用?PHP XML_Parser使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


在下文中一共展示了XML_Parser类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的PHP代码示例。

示例1: XML_Messages_Parser

 function XML_Messages_Parser(&$i18n, $srcenc = 'UTF-8', $mode = 'func', $tgtenc = null)
 {
     parent::XML_Parser($srcenc, $mode, $tgtenc);
     $this->_i18n =& $i18n;
 }
开发者ID:BackupTheBerlios,项目名称:skyapp,代码行数:5,代码来源:XML.php

示例2: Translator_XMLParser

 function Translator_XMLParser(&$translator)
 {
     parent::XML_Parser('iso-8859-1', 'event', 'iso-8859-1');
     $this->translator =& $translator;
 }
开发者ID:span20,项目名称:Kallay,代码行数:5,代码来源:Translator_XMLParser.php

示例3: ReportParser

 function ReportParser(&$reportClass)
 {
     static $uc;
     static $ucd;
     static $ucf;
     $this->user_criteria =& $uc;
     $this->user_criteria_data =& $ucd;
     $this->user_criteria_fields =& $ucf;
     # Create the user criteria fields as static members
     if (!is_a($reportClass, 'Reporting')) {
         die('Parameter 1 must be a Reporting reference.');
     }
     # Save the Reporting reference
     $this->reportClass =& $reportClass;
     # Clear the cdata buffer
     $this->cdata = "";
     # Init the stack
     $this->stack = array();
     # Call into XML_Parser, to set us up the bomb. (See references on ALL YOUR BASE R BELONG TO US - Seriously, it's funny shit.)
     parent::XML_Parser();
     # Do NOT perform case foldering!
     $this->folding = false;
 }
开发者ID:chiranjeevjain,项目名称:agilebill,代码行数:23,代码来源:class.ReportParser.php

示例4: __construct

 function __construct()
 {
     // force ISO-8859-1 due to different defaults for PHP4 and PHP5
     // todo: this probably needs to be investigated some more andcleaned up
     parent::XML_Parser('ISO-8859-1');
 }
开发者ID:villos,项目名称:tree_admin,代码行数:6,代码来源:ParserBase.php

示例5: parseXML

 /**
  * Parses the XML text specified in the data argument.
  *
  * @param string $data the XML document to parse.
  */
 function parseXML($data)
 {
     // Strip white space
     $data = preg_replace("/>\\s+</i", "><", $data);
     $parser = new XML_Parser($this);
     $parser->parse($data);
 }
开发者ID:BackupTheBerlios,项目名称:ydframework-svn,代码行数:12,代码来源:lib.xml.inc.php

示例6: myParser

 function myParser()
 {
     parent::XML_Parser();
 }
开发者ID:kractos26,项目名称:orfeo,代码行数:4,代码来源:xml_parser_file.php

示例7: uploadConfirmPerl

    /**
     * Outputs frontpage HTML
     *
     * @return       Nothing
     */
    function uploadConfirmPerl()
	{
	global $database, $my, $acl, $mosConfig_absolute_path, $mosConfig_mailfrom, $mosConfig_fromname, $mosConfig_live_site, $Itemid, $mosConfig_sitename;

	$c = hwd_vs_Config::get_instance();
	$db = & JFactory::getDBO();
	$my = & JFactory::getUser();
	$acl= & JFactory::getACL();

	// get server configuration data
	require_once(JPATH_SITE.DS.'administrator'.DS.'components'.DS.'com_hwdvideoshare'.DS.'serverconfig.hwdvideoshare.php');
	$s = hwd_vs_SConfig::get_instance();

	//******************************************************************************************************
	//   ATTENTION: THIS FILE HEADER MUST REMAIN INTACT. DO NOT DELETE OR MODIFY THIS FILE HEADER.
	//
	//   Name: ubr_finished.php
	//   Revision: 1.3
	//   Date: 2/18/2008 5:36:57 PM
	//   Link: http://uber-uploader.sourceforge.net
	//   Initial Developer: Peter Schmandra  http://www.webdice.org
	//   Description: Show successful file uploads.
	//
	//   Licence:
	//   The contents of this file are subject to the Mozilla Public
	//   License Version 1.1 (the "License"); you may not use this file
	//   except in compliance with the License. You may obtain a copy of
	//   the License at http://www.mozilla.org/MPL/
	//
	//   Software distributed under the License is distributed on an "AS
	//   IS" basis, WITHOUT WARRANTY OF ANY KIND, either express or
	//   implied. See the License for the specific language governing
	//   rights and limitations under the License.
	//
	//***************************************************************************************************************

	//***************************************************************************************************************
	// The following possible query string formats are assumed
	//
	// 1. ?upload_id=upload_id
	// 2. ?about=1
	//****************************************************************************************************************

	$THIS_VERSION = "1.3";                                // Version of this file
	$UPLOAD_ID = '';                                      // Initialize upload id

	require_once(JPATH_SITE.DS.'components'.DS.'com_hwdvideoshare'.DS.'assets'.DS.'uploads'.DS.'perl'.DS.'ubr_ini.php');
	require_once(JPATH_SITE.DS.'components'.DS.'com_hwdvideoshare'.DS.'assets'.DS.'uploads'.DS.'perl'.DS.'ubr_lib.php');
	require_once(JPATH_SITE.DS.'components'.DS.'com_hwdvideoshare'.DS.'assets'.DS.'uploads'.DS.'perl'.DS.'ubr_finished_lib.php');

	if($PHP_ERROR_REPORTING){ error_reporting(E_ALL); }

	header('Expires: Mon, 26 Jul 1997 05:00:00 GMT');
	header('Last-Modified: '.date('r'));
	header('Cache-Control: no-store, no-cache, must-revalidate');
	header('Cache-Control: post-check=0, pre-check=0', FALSE);
	header('Pragma: no-cache');

	if(preg_match("/^[a-zA-Z0-9]{32}$/", $_GET['upload_id'])){ $UPLOAD_ID = $_GET['upload_id']; }
	elseif(isset($_GET['about']) && $_GET['about'] == 1){ kak("<u><b>UBER UPLOADER FINISHED PAGE</b></u><br>UBER UPLOADER VERSION =  <b>" . $UBER_VERSION . "</b><br>UBR_FINISHED = <b>" . $THIS_VERSION . "<b><br>\n", 1 , __LINE__); }
	else{ kak("<font color='red'>ERROR</font>: Invalid parameters passed<br>", 1, __LINE__); }

	//Declare local values
	$_XML_DATA = array();                                          // Array of xml data read from the upload_id.redirect file
	$_CONFIG_DATA = array();                                       // Array of config data read from the $_XML_DATA array
	$_POST_DATA = array();                                         // Array of posted data read from the $_XML_DATA array
	$_FILE_DATA = array();                                         // Array of 'FileInfo' objects read from the $_XML_DATA array
	$_FILE_DATA_TABLE = '';                                        // String used to store file info results nested between <tr> tags
	$_FILE_DATA_EMAIL = '';                                        // String used to store file info results

	$xml_parser = new XML_Parser;                                  // XML parser
	$xml_parser->setXMLFile($TEMP_DIR, $_REQUEST['upload_id']);    // Set upload_id.redirect file
	$xml_parser->setXMLFileDelete($DELETE_REDIRECT_FILE);          // Delete upload_id.redirect file when finished parsing
	$xml_parser->parseFeed();                                      // Parse upload_id.redirect file

	// Display message if the XML parser encountered an error
	if($xml_parser->getError()){ kak($xml_parser->getErrorMsg(), 1, __LINE__); }

	$_XML_DATA = $xml_parser->getXMLData();                        // Get xml data from the xml parser
	$_CONFIG_DATA = getConfigData($_XML_DATA);                     // Get config data from the xml data
	$_POST_DATA  = getPostData($_XML_DATA);                        // Get post data from the xml data
	$_FILE_DATA = getFileData($_XML_DATA);                         // Get file data from the xml data

	// Output XML DATA, CONFIG DATA, POST DATA, FILE DATA to screen and exit if DEBUG_ENABLED.
	if($DEBUG_FINISHED){
		debug("<br><u>XML DATA</u>", $_XML_DATA);
		debug("<u>CONFIG DATA</u>", $_CONFIG_DATA);
		debug("<u>POST DATA</u>", $_POST_DATA);
		debug("<u>FILE DATA</u><br>", $_FILE_DATA);
		exit;
	}

	/////////////////////////////////////////////////////////////////////////////////////////////////
	//
	//           *** ATTENTION: ENTER YOUR CODE HERE !!! ***
//.........这里部分代码省略.........
开发者ID:rkern21,项目名称:videoeditor,代码行数:101,代码来源:uploads.php

示例8: BasicXmlParser

 /** 
  * Constructor 
  * @access public
  */
 public function BasicXmlParser()
 {
     parent::XML_Parser();
 }
开发者ID:sebastiansanio,项目名称:tallerdeprogramacion2fiuba,代码行数:8,代码来源:BasicXmlParser.php

示例9: OA_UpgradePackageParser

 function OA_UpgradePackageParser()
 {
     parent::XML_Parser('ISO-8859-1');
     //$this->__construct();
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:5,代码来源:UpgradePackageParser.php

示例10: setInput

 function setInput($fp)
 {
     if (in_array($fp, $this->aTables)) {
         $this->tableName = $fp;
     }
     parent::setInput(MAX_PATH . '/tests/data/testData_' . $fp . '.xml');
 }
开发者ID:ballistiq,项目名称:revive-adserver,代码行数:7,代码来源:MAX_TestData_XML_Parser.php

示例11: array

 function __construct($variables, $fail_on_invalid_names = true, $structure = false, $valid_types = array(), $force_defaults = true)
 {
     // force ISO-8859-1 due to different defaults for PHP4 and PHP5
     // todo: this probably needs to be investigated some more andcleaned up
     parent::__construct('ISO-8859-1');
     $this->variables = $variables;
     $this->structure = $structure;
     //        $this->val = new MDB2_Schema_Validate($fail_on_invalid_names, $valid_types, $force_defaults);
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:9,代码来源:ParserChangeset.php

示例12:

 /**
  * Constructor
  *
  * @access public
  * @param mixed File pointer, name of the RSS file, or an RSS string.
  * @param string  Source charset encoding, use null (default) to use
  *                default encoding (ISO-8859-1)
  * @param string  Target charset encoding, use null (default) to use
  *                default encoding (ISO-8859-1)
  * @return void
  */
 function __construct($handle = '', $srcenc = null, $tgtenc = null)
 {
     if ($srcenc === null && $tgtenc === null) {
         parent::__construct();
     } else {
         parent::__construct($srcenc, 'event', $tgtenc);
     }
     $this->setInput($handle);
     if ($handle == '') {
         $this->customRaiseError('No input passed.');
     }
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:23,代码来源:RSS.php

示例13:

 /**
  * Parses the data of the given configuration file
  *
  * @access public
  * @param string $datasrc    path to the configuration file
  * @param object $obj        reference to a config object
  * @return mixed returns a PEAR_ERROR, if error occurs or true if ok
  */
 function &parseDatasrc($datasrc, &$obj)
 {
     $this->folding = false;
     $this->cdata = null;
     parent::__construct($this->options['encoding'], 'event');
     $this->containers[0] =& $obj->container;
     if (is_string($datasrc)) {
         if ($this->options['isFile']) {
             $err = $this->setInputFile($datasrc);
             if (PEAR::isError($err)) {
                 return $err;
             }
             $err = $this->parse();
         } else {
             $err = $this->parseString($datasrc, true);
         }
     } else {
         $this->setInput($datasrc);
         $err = $this->parse();
     }
     if (PEAR::isError($err)) {
         return $err;
     }
     return true;
 }
开发者ID:esclapes,项目名称:revive-adserver,代码行数:33,代码来源:XML.php

示例14:

 /**
  * Maps an XML string to an XML_Tree.
  *
  * @return mixed The XML tree root (an XML_Tree_Node), or PEAR_Error upon error.
  * @access public
  */
 function &getTreeFromString($str)
 {
     $this->i = null;
     $this->folding = false;
     parent::__construct(null, 'event');
     $this->cdata = null;
     $err = $this->parseString($str);
     if (PEAR::isError($err)) {
         return $err;
     }
     return $this->root;
 }
开发者ID:Spark-Eleven,项目名称:revive-adserver,代码行数:18,代码来源:Tree.php

示例15:

 /**
  * Constructor
  *
  * @access public
  * @param mixed File pointer or name of the RDF file.
  * @return void
  */
 function __construct($handle = '')
 {
     parent::__construct();
     if (!empty($handle)) {
         $this->setInput($handle);
     } else {
         $this->raiseError('No filename passed.');
     }
 }
开发者ID:nahakiole,项目名称:cloudrexx,代码行数:16,代码来源:RSS.class.php


注:本文中的XML_Parser类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。