PageRenderTime 949ms queryTime 400ms sortTime 4ms getByIdsTime 278ms findMatchingLines 190ms

100+ results results for 'php xml_parse repo:thepurpleblob/gumoodle' (949 ms)

Not the results you expected?
class-IXR-message.php https://gitlab.com/VTTE/sitios-vtte | PHP | 234 lines
                    
1<?php
                    
2
                    
30	/**
                    
31	 * PHP5 constructor.
                    
32	 */
                    
38	/**
                    
39	 * PHP4 constructor.
                    
40	 */
                    
47        if ( ! function_exists( 'xml_parser_create' ) ) {
                    
48            trigger_error( __( "PHP's XML extension is not available. Please contact your hosting provider to enable PHP's XML extension." ) );
                    
49            return false;
                    
91
                    
92        $this->_parser = xml_parser_create();
                    
93        // Set XML parser to take the case of tags in to account
                    
93        // Set XML parser to take the case of tags in to account
                    
94        xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);
                    
95        // Set XML parser callback functions
                    
                
xs_news.php https://github.com/igorw-forks/icy_phoenix.git | PHP | 344 lines
                    
1<?php
                    
2/**
                    
6* @copyright (c) 2008 Icy Phoenix
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
8*
                    
190
                    
191						$xml_parser = xml_parser_create();
                    
192						xml_set_element_handler($xml_parser, 'startElement', 'endElement');
                    
200								{
                    
201									if (!xml_parse($xml_parser, $xml_buffer, feof($fp)))
                    
202									{
                    
203										$xml_error = true;
                    
204										$xml_error_msg = sprintf("XML error: %s at line %d", xml_error_string(xml_get_error_code($xml_parser)), xml_get_current_line_number($xml_parser));
                    
205									}
                    
207
                    
208								xml_parser_free($xml_parser);
                    
209
                    
                
import.inc.php https://github.com/umbecr/camilaframework.git | PHP | 227 lines
                    
1<?php
                    
2
                    
2
                    
3/* This File is part of Camila PHP Framework
                    
4   Copyright (C) 2006-2011 Umberto Bresciani
                    
5
                    
6   Camila PHP Framework is free software; you can redistribute it and/or modify
                    
7   it under the terms of the GNU General Public License as published by
                    
10
                    
11   Camila PHP Framework is distributed in the hope that it will be useful,
                    
12   but WITHOUT ANY WARRANTY; without even the implied warranty of
                    
44
                    
45        $xml_parser = xml_parser_create();
                    
46
                    
50            fclose($fp);
                    
51            xml_parse_into_struct($xml_parser, $data, $vals, $index);
                    
52            xml_parser_free($xml_parser);
                    
                
Tbx.php https://github.com/tuteke/isaved.git | PHP | 179 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Tbx.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24#require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27#require_once 'Zend/Translate/Adapter.php';
                    
28
                    
47     * Generates the tbx adapter
                    
48     * This adapter reads with php's xml_parser
                    
49     *
                    
73        if (!is_readable($filename)) {
                    
74            #require_once 'Zend/Translate/Exception.php';
                    
75            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
xml_parser.php https://gitlab.com/phamngsinh/baitaplon_sinhvien | PHP | 427 lines
                    
24	if(!strcmp($xml_parser_handlers[$parser]->error,""))
                    
25		$xml_parser_handlers[$parser]->StartElement($xml_parser_handlers[$parser],$name,$attrs);
                    
26}
                    
224				$xml_parser_handlers[$this->xml_parser]=new xml_parser_handler_class;
                    
225				$xml_parser_handlers[$this->xml_parser]->xml_parser=$this->xml_parser;
                    
226				$xml_parser_handlers[$this->xml_parser]->store_positions=$this->store_positions;
                    
229			}
                    
230			xml_set_element_handler($this->xml_parser,"xml_parser_start_element_handler","xml_parser_end_element_handler");
                    
231			xml_set_character_data_handler($this->xml_parser,"xml_parser_character_data_handler");
                    
249					}
                    
250					xml_parser_free($this->xml_parser);
                    
251					$this->xml_parser=0;
                    
351		if(!($definition=@fopen($file,"r")))
                    
352			return("could not open the XML file ($file)".(IsSet($php_errormsg) ? ': '.$php_errormsg : ''));
                    
353		$error=$this->ParseStream($definition);
                    
                
Message.php https://gitlab.com/wuhang2003/typecho | PHP | 167 lines
                    
1<?php
                    
2/*
                    
5   Site:   http://scripts.incutio.com/xmlrpc/
                    
6   Manual: http://scripts.incutio.com/xmlrpc/manual.php
                    
7   Made available under the Artistic License: http://www.opensource.org/licenses/artistic-license.php
                    
40        }
                    
41        $this->_parser = xml_parser_create();
                    
42        // Set XML parser to take the case of tags in to account
                    
42        // Set XML parser to take the case of tags in to account
                    
43        xml_parser_set_option($this->_parser, XML_OPTION_CASE_FOLDING, false);
                    
44        // Set XML parser callback functions
                    
47        xml_set_character_data_handler($this->_parser, 'cdata');
                    
48        if (!xml_parse($this->_parser, $this->message)) {
                    
49            /* die(sprintf('XML error: %s at line %d',
                    
53        }
                    
54        xml_parser_free($this->_parser);
                    
55        // Grab the error messages, if any
                    
                
ARC2_LegacyXMLParser.php https://github.com/rinie/TransFormr.git | PHP | 315 lines
                    
1<?php
                    
2/*
                    
63      }
                    
64      if (!xml_parse($this->xml_parser, $d, false)) {
                    
65        $error_str = xml_error_string(xml_get_error_code($this->xml_parser));
                    
65        $error_str = xml_error_string(xml_get_error_code($this->xml_parser));
                    
66        $line = xml_get_current_line_number($this->xml_parser);
                    
67        if (!$iso_fallback && preg_match("/Invalid character/i", $error_str)) {
                    
67        if (!$iso_fallback && preg_match("/Invalid character/i", $error_str)) {
                    
68          xml_parser_free($this->xml_parser);
                    
69          unset($this->xml_parser);
                    
83    $this->target_encoding = xml_parser_get_option($this->xml_parser, XML_OPTION_TARGET_ENCODING);
                    
84    xml_parser_free($this->xml_parser);
                    
85    $this->reader->closeStream();
                    
194  
                    
195  function updateNode($node) {/* php4-save */
                    
196    $this->nodes[$node['id']] = $node;
                    
                
Xmlrpcs.php https://github.com/ComputerScienceHouse/Electronic-Evals.git | PHP | 536 lines
                    
1<?php  if ( ! defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
15
                    
16if ( ! function_exists('xml_parser_create'))
                    
17{	
                    
17{	
                    
18	show_error('Your PHP installation does not support XML');
                    
19}
                    
163		
                    
164		$parser = xml_parser_create($this->xmlrpc_defencoding);
                    
165		$parser_object = new XML_RPC_Message("filler");
                    
175		xml_set_object($parser, $parser_object);
                    
176		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
                    
177		xml_set_element_handler($parser, 'open_tag', 'closing_tag');
                    
                
gc_xmlparser.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 202 lines
                    
1<?php
                    
2/**
                    
21  
                    
22  For more info: http://code.google.com/p/google-checkout-php-sample-code/
                    
23
                    
30
                    
31/* This uses SAX parser to convert XML data into PHP associative arrays
                    
32 * When invoking the constructor with the input data, strip out the first XML line 
                    
91    function gc_xmlparser($input, $xmlParams=array(XML_OPTION_CASE_FOLDING => 0)) {
                    
92      $xmlp = xml_parser_create();
                    
93      foreach($xmlParams as $opt => $optVal) {
                    
100        }
                    
101        xml_parser_set_option($xmlp, $opt, $optVal);
                    
102      }
                    
103      
                    
104      if(xml_parse_into_struct($xmlp, $input, $vals, $index)) {
                    
105        $this->root = $this->_foldCase($vals[0]['tag']);
                    
                
google_xml.php https://github.com/GreyTeardrop/socionicasys-forum.git | PHP | 247 lines
                    
6* @copyright (c) 2006 - 2009 www.phpbb-seo.com
                    
7* @license http://opensource.org/osi3.0/licenses/lgpl-license.php GNU Lesser General Public License
                    
8*
                    
10// First basic security
                    
11if ( !defined('IN_PHPBB') ) {
                    
12	exit;
                    
45		);
                    
46		$this->module_config['xml_parse'] = (boolean) ($this->module_config['google_randomize'] || $this->module_config['google_unique'] || $this->module_config['google_force_limit'] || $this->module_config['google_force_lastmod']|| $this->module_config['google_check_robots']);
                    
47		// Check cache
                    
60	function init_url_settings() {
                    
61		global $phpbb_seo;
                    
62		// vars will fell like rain in the code ;)
                    
62		// vars will fell like rain in the code ;)
                    
63		$this->url_settings['google_xml_delim'] = !empty($phpbb_seo->seo_delim['google_xml']) ? $phpbb_seo->seo_delim['google_xml'] : '-';
                    
64		$this->url_settings['google_xml_static'] = !empty($phpbb_seo->seo_static['google_xml']) ? $phpbb_seo->seo_static['google_xml'] : 'xml';
                    
                
AquaticPrimeEsellerateMySQL.php https://github.com/dannygreg/AquaticPrime.git | PHP | 250 lines
                    
103	// Work around a PHP 5.2.2 bug preventing POST data from reaching the script.
                    
104	// See <http://bugs.php.net/bug.php?id=41293> for details.
                    
105	if ($_SERVER["REQUEST_METHOD"] == "POST") {
                    
110
                    
111	$xml_parser = xml_parser_create();
                    
112	xml_set_element_handler($xml_parser, "startElement", "endElement");
                    
114
                    
115	if (!xml_parse($xml_parser, $HTTP_RAW_POST_DATA, TRUE))
                    
116	{
                    
119			xml_get_current_line_number($xml_parser));
                    
120		xml_parser_free($xml_parser);
                    
121		ReportFatalError($msg);
                    
123
                    
124	xml_parser_free($xml_parser);
                    
125
                    
                
bug32001.php https://gitlab.com/iranjith4/hhvm | PHP | 156 lines
                    
1<?php
                    
2class testcase {
                    
89
                    
90		$parser = xml_parser_create(NULL);
                    
91		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
95		if ($this->chunk_size == 0) {
                    
96			$success = @xml_parse($parser, $data, true);
                    
97		} else {
                    
99					$offset += $this->chunk_size) {
                    
100				$success = @xml_parse($parser, substr($data, $offset, $this->chunk_size), false);
                    
101				if (!$success) {
                    
105			if ($success) {
                    
106				$success = @xml_parse($parser, "", true);
                    
107			}
                    
                
Xliff.php https://github.com/Exercise/zf2.git | PHP | 230 lines
                    
1<?php
                    
2/**
                    
78        $this->_target = $locale;
                    
79        $this->_file   = xml_parser_create($encoding);
                    
80        xml_set_object($this->_file, $this);
                    
80        xml_set_object($this->_file, $this);
                    
81        xml_parser_set_option($this->_file, XML_OPTION_CASE_FOLDING, 0);
                    
82        xml_set_element_handler($this->_file, "_startElement", "_endElement");
                    
84
                    
85        if (!xml_parse($this->_file, file_get_contents($filename))) {
                    
86            $ex = sprintf('XML error: %s at line %d',
                    
88                          xml_get_current_line_number($this->_file));
                    
89            xml_parser_free($this->_file);
                    
90            throw new Translator\Exception($ex);
                    
                
Rest.php https://bitbucket.org/acidel/buykoala.git | PHP | 366 lines
                    
1<?php
                    
2/**
                    
9 * It is also available through the world-wide-web at this URL:
                    
10 * http://opensource.org/licenses/osl-3.0.php
                    
11 * If you did not receive a copy of the license and are unable to
                    
23 * @copyright   Copyright (c) 2011 Magento Inc. (http://www.magentocommerce.com)
                    
24 * @license     http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
25 */
                    
53     * XML parser
                    
54     * @var Mage_Xml_Parser
                    
55     */
                    
115     *
                    
116     * @return Mage_Xml_Parser
                    
117     */
                    
120        if(is_null($this->_parser)) {
                    
121            $this->_parser = new Mage_Xml_Parser();
                    
122        }
                    
                
defines.inc.php https://gitlab.com/nghiep5890/prestashop | PHP | 218 lines
                    
1<?php
                    
2/**
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/osl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
22*  @copyright  2007-2015 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
46
                    
47if (!defined('PHP_VERSION_ID')) {
                    
48    $version = explode('.', PHP_VERSION);
                    
48    $version = explode('.', PHP_VERSION);
                    
49    define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
                    
50}
                    
109}
                    
110define('_PS_PEAR_XML_PARSER_PATH_',  _PS_TOOL_DIR_.'pear_xml_parser/');
                    
111define('_PS_SWIFT_DIR_',             _PS_TOOL_DIR_.'swift/');
                    
                
Xmlrpcs.php https://github.com/holsinger/openfloor.git | PHP | 503 lines
                    
1<?php  if (!defined('BASEPATH')) exit('No direct script access allowed');
                    
2/**
                    
4 *
                    
5 * An open source application development framework for PHP 4.3.2 or newer
                    
6 *
                    
15
                    
16if ( ! function_exists('xml_parser_create'))
                    
17{	
                    
17{	
                    
18	show_error('Your PHP installation does not support XML');
                    
19}
                    
157		
                    
158		$parser = xml_parser_create($this->xmlrpc_defencoding);
                    
159		$parser_object = new XML_RPC_Message("filler");
                    
169		xml_set_object($parser, $parser_object);
                    
170		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, true);
                    
171		xml_set_element_handler($parser, 'open_tag', 'closing_tag');
                    
                
Document.php https://gitlab.com/Japang-Jawara/jawara-penilaian | PHP | 404 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @package php-svg-lib
                    
4 * @link    http://github.com/PhenX/php-svg-lib
                    
64    protected function initParser() {
                    
65        $parser = xml_parser_create("utf-8");
                    
66        xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
                    
109
                    
110        $parser = xml_parser_create("utf-8");
                    
111        xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, false);
                    
125        while ($line = fread($fp, 8192)) {
                    
126            xml_parse($parser, $line, false);
                    
127
                    
132
                    
133        xml_parser_free($parser);
                    
134
                    
                
defines.inc.php https://gitlab.com/brunorafael/enosis | PHP | 218 lines
                    
1<?php
                    
2/**
                    
9* It is also available through the world-wide-web at this URL:
                    
10* http://opensource.org/licenses/osl-3.0.php
                    
11* If you did not receive a copy of the license and are unable to
                    
22*  @copyright  2007-2016 PrestaShop SA
                    
23*  @license    http://opensource.org/licenses/osl-3.0.php  Open Software License (OSL 3.0)
                    
24*  International Registered Trademark & Property of PrestaShop SA
                    
46
                    
47if (!defined('PHP_VERSION_ID')) {
                    
48    $version = explode('.', PHP_VERSION);
                    
48    $version = explode('.', PHP_VERSION);
                    
49    define('PHP_VERSION_ID', ($version[0] * 10000 + $version[1] * 100 + $version[2]));
                    
50}
                    
109}
                    
110define('_PS_PEAR_XML_PARSER_PATH_',  _PS_TOOL_DIR_.'pear_xml_parser/');
                    
111define('_PS_SWIFT_DIR_',             _PS_TOOL_DIR_.'swift/');
                    
                
Simple.php https://github.com/yabba/openx.git | PHP | 297 lines
                    
11// | http://www.php.net/license/3_0.txt.                                  |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
13// | obtain it through the world-wide-web, please send a note to          |
                    
37/**
                    
38 * built on XML_Parser
                    
39 */
                    
39 */
                    
40require_once 'XML/Parser.php';
                    
41
                    
44 *
                    
45 * This class is a simplified version of XML_Parser.
                    
46 * In most XML applications the real action is executed,
                    
78 */
                    
79class XML_Parser_Simple extends XML_Parser
                    
80{
                    
                
xmlparser.php https://github.com/tayles/whmcs-api-framework.git | PHP | 430 lines
                    
1<?php
                    
2/**
                    
16/**
                    
17 * XML Parser Class (php5)
                    
18 * 
                    
83    /**
                    
84     * Initiates and runs PHP's XML parser
                    
85     */
                    
88        //Create the parser resource
                    
89        $this->parser = xml_parser_create();
                    
90        
                    
96        //Error handling
                    
97        if (!xml_parse($this->parser, $this->xml))
                    
98            $this->HandleError(xml_get_error_code($this->parser), xml_get_current_line_number($this->parser), xml_get_current_column_number($this->parser));
                    
100        //Free the parser
                    
101        xml_parser_free($this->parser);
                    
102    }
                    
                
xmldocument.php https://github.com/eosc/EosC-2.3.git | PHP | 302 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3    $Id: xmldocument.php,v 1.5 2003/06/27 01:03:03 torinwalker Exp $
                    
4    
                    
228    function destruct(){
                    
229        xml_parser_free($this->xp);
                    
230    }
                    
274    function parse($xmlString) {
                    
275        if(!($this->xp = @xml_parser_create())) {
                    
276            $this->error['description'] = 'Could not create xml parser';
                    
292        } 
                    
293        xml_parser_set_option($this->xp, XML_OPTION_CASE_FOLDING, false);
                    
294        if (!$this->hasErrors()) {
                    
294        if (!$this->hasErrors()) {
                    
295            if(!@xml_parse($this->xp, $xmlString)) {
                    
296                $this->error['description'] = xml_error_string(xml_get_error_code($this->xp));
                    
                
modsxmlsenayan.inc.php https://gitlab.com/mucill/sman7 | PHP | 224 lines
                    
1<?php
                    
2/**
                    
24
                    
25define('MODS_XML_PARSE_ERROR', 199);
                    
26
                    
55      } catch (Exception $xmlerr) {
                    
56          return MODS_XML_PARSE_ERROR;
                    
57          // die($xmlerr->getMessage());
                    
                
Simple.php https://gitlab.com/LisovyiEvhenii/ismextensions | PHP | 326 lines
                    
46 * @version   CVS: $Id: Simple.php,v 1.7 2008/08/24 21:48:21 ashnazg Exp $
                    
47 * @link      http://pear.php.net/package/XML_Parser
                    
48 */
                    
61 *
                    
62 * XML_Parser_Simple allows you to just implement one callback
                    
63 * for each tag that will receive the tag with its attributes
                    
68 *
                    
69 * class myParser extends XML_Parser_Simple
                    
70 * {
                    
93 * @version   Release: @package_version@
                    
94 * @link      http://pear.php.net/package/XML_Parser
                    
95 */
                    
95 */
                    
96class XML_Parser_Simple extends XML_Parser
                    
97{
                    
                
Xml.class.php http://sqltoappledictionary.googlecode.com/svn/trunk/ | PHP | 377 lines
                    
1<?php
                    
2
                    
295		Xml::$build = Xml::createDocument();
                    
296		$xml_parser = xml_parser_create();
                    
297		xml_set_element_handler($xml_parser, isset(Xml::$__start_element_handler) ? Xml::$__start_element_handler: array("Xml", "__start_element_handler"), isset(Xml::$__end_element_handler) ? Xml::$__end_element_handler: array("Xml", "__end_element_handler"));
                    
297		xml_set_element_handler($xml_parser, isset(Xml::$__start_element_handler) ? Xml::$__start_element_handler: array("Xml", "__start_element_handler"), isset(Xml::$__end_element_handler) ? Xml::$__end_element_handler: array("Xml", "__end_element_handler"));
                    
298		xml_set_character_data_handler($xml_parser, isset(Xml::$__character_data_handler) ? Xml::$__character_data_handler: array("Xml", "__character_data_handler"));
                    
299		xml_set_default_handler($xml_parser, isset(Xml::$__default_handler) ? Xml::$__default_handler: array("Xml", "__default_handler"));
                    
299		xml_set_default_handler($xml_parser, isset(Xml::$__default_handler) ? Xml::$__default_handler: array("Xml", "__default_handler"));
                    
300		xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, 0);
                    
301		xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, 0);
                    
305		}
                    
306		if(1 !== xml_parse($xml_parser, $str, true)) {
                    
307			throw new HException("Xml parse error (" . ((xml_error_string(xml_get_error_code($xml_parser)) . ") line #") . xml_get_current_line_number($xml_parser)));
                    
308		}
                    
309		xml_parser_free($xml_parser);
                    
310		if($isComplete) {
                    
                
Qt.php https://bitbucket.org/selfeky/xclusivescardwebsite.git | PHP | 160 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Qt.php 23775 2011-03-01 17:25:24Z ralph $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
62        if (!is_readable($filename)) {
                    
63            require_once 'Zend/Translate/Exception.php';
                    
64            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
69        $encoding = $this->_findEncoding($filename);
                    
70        $this->_file = xml_parser_create($encoding);
                    
71        xml_set_object($this->_file, $this);
                    
                
Parser.php https://github.com/wokkie/sitellite.git | PHP | 238 lines
                    
1<?php
                    
2
                    
27	function parse ($schema) {
                    
28		$this->parser = xml_parser_create ($this->encoding);
                    
29		if (! $this->parser) {
                    
32		}
                    
33		if (! xml_parser_set_option ($this->parser, XML_OPTION_CASE_FOLDING, false)) {
                    
34			xml_parser_free ($this->parser);
                    
48
                    
49		if (xml_parse_into_struct ($this->parser, $schema, $this->nodes, $this->tags)) {
                    
50			xml_parser_free ($this->parser);
                    
60			$this->error = 'Relax Error: ' . xml_error_string ($this->err_code);
                    
61			xml_parser_free ($this->parser);
                    
62			return false;
                    
                
class_simplexml.php https://github.com/Smokki/PsychoStats-extended.git | PHP | 305 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3	Class from phpclasses.org:
                    
4	http://www.phpclasses.org/browse/package/4484.html
                    
16	var $skip_empty_values = false;
                    
17	var $php_errormsg;
                    
18	var $evalCode="";
                    
256	{
                    
257		$php_errormsg="";
                    
258		$this->result="";
                    
261		$data = file_get_contents($file);
                    
262		if (!$data) return 'Cannot open xml document: ' . (isset($php_errormsg) ? $php_errormsg : $file);
                    
263		return $this->xml_load_string($data, $resulttype, $encoding);
                    
266	function xml_load_string($data, $resulttype = 'object', $encoding = 'UTF-8') {
                    
267		$parser = xml_parser_create($encoding);
                    
268		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
                
php-xmlparser.el https://gitlab.com/_njdm/emacs.d | Emacs Lisp | 194 lines
                    
22;; More see file:///usr/share/doc/php-doc/html/function.xml-parse-into-struct.html
                    
23;; http://php.net/manual/en/book.xml.php
                    
24
                    
66
                    
67(define-skeleton php-xml_parse
                    
68  "Insert a xml_parse"
                    
88
                    
89(define-skeleton php-xml_parser_free
                    
90  "Insert a xml_parser_free statement."
                    
95
                    
96(define-skeleton php-xml_parser_get_option
                    
97  "Insert a xml_parser_get_option statement."
                    
103
                    
104(define-skeleton php-xml_parser_set_option
                    
105  "Insert a xml_parser_set_option statement."
                    
                
CliDumperTest.php https://gitlab.com/codegod/evricommunity | PHP | 501 lines
                    
1<?php
                    
2
                    
20 */
                    
21class CliDumperTest extends \PHPUnit_Framework_TestCase
                    
22{
                    
26    {
                    
27        require __DIR__.'/Fixtures/dumb-var.php';
                    
28
                    
28
                    
29        $dumper = new CliDumper('php://output');
                    
30        $dumper->setColors(false);
                    
44        $out = preg_replace('/[ \t]+$/m', '', $out);
                    
45        $intMax = PHP_INT_MAX;
                    
46        $res = (int) $var['res'];
                    
114    {
                    
115        $var = xml_parser_create();
                    
116
                    
                
Qt.php https://github.com/arturolinares/asandbox.git | PHP | 160 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2010 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Qt.php 20096 2010-01-06 02:05:09Z bkarwin $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
62        if (!is_readable($filename)) {
                    
63            require_once 'Zend/Translate/Exception.php';
                    
64            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
69        $encoding = $this->_findEncoding($filename);
                    
70        $this->_file = xml_parser_create($encoding);
                    
71        xml_set_object($this->_file, $this);
                    
                
Tbx.php https://github.com/jiiarra/site.git | PHP | 179 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Tbx.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
47     * Generates the tbx adapter
                    
48     * This adapter reads with php's xml_parser
                    
49     *
                    
73        if (!is_readable($filename)) {
                    
74            require_once 'Zend/Translate/Exception.php';
                    
75            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
index.php https://bitbucket.org/dereckson/phpldapadmin.git | PHP | 147 lines
                    
49if (! extension_loaded('pcre'))
                    
50	die('<p>Your install of PHP appears to be missing PCRE support.</p><p>Please install PCRE support before using phpLDAPadmin.<br /><small>(Dont forget to restart your web server afterwards)</small></p>');
                    
51
                    
61if (! extension_loaded('session'))
                    
62	error('<p>Your install of PHP appears to be missing php-session support.</p><p>Please install php-session support before using phpLDAPadmin.<br /><small>(Dont forget to restart your web server afterwards)</small></p>','error',null,true);
                    
63
                    
67		'title'=>_('Missing required extension'),
                    
68		'body'=>'Your install of PHP appears to be missing GETTEXT support.</p><p>GETTEXT is used for language translation.</p><p>Please install GETTEXT support before using phpLDAPadmin.<br /><small>(Dont forget to restart your web server afterwards)</small>',
                    
69		'type'=>'error'));
                    
74		'title'=>_('Missing required extension'),
                    
75		'body'=>'Your install of PHP appears to be missing LDAP support.<br /><br />Please install LDAP support before using phpLDAPadmin.<br /><small>(Dont forget to restart your web server afterwards)</small>',
                    
76		'type'=>'error'));
                    
81		'title'=>_('Missing required extension'),
                    
82		'body'=>'Your install of PHP appears to be missing XML support.<br /><br />Please install XML support before using phpLDAPadmin.<br /><small>(Dont forget to restart your web server afterwards)</small>',
                    
83		'type'=>'error'));
                    
                
setup.php https://github.com/bernard357/yacs.git | PHP | 353 lines
                    
95		// provide instructions
                    
96		Logger::error(sprintf(i18n::s('ERROR: YACS requires at least PHP version 5.3. The server runs version %s.'), phpversion()));
                    
97
                    
114
                    
115		$context['text'] .= '<p class="details"><a href="setup.php">'.i18n::s('Check the MySQL PHP extension again')."</a></p>\n";
                    
116
                    
134
                    
135		$context['text'] .= '<p class="details"><a href="setup.php">'.i18n::s('Check the XML PHP extension again')."</a></p>\n";
                    
136
                    
151		$context['text'] .= '<p>'.i18n::s('WARNING: You will not be able to upload zip files.')."</p>\n";
                    
152		$context['text'] .= '<p class="details"><a href="setup.php">'.i18n::s('Check the ZIP PHP extension again')."</a></p>\n";
                    
153
                    
312	// if there is no index at the upper level
                    
313	if(!file_exists($context['path_to_root'].'../index.php') && ($content = Safe::file_get_contents($context['path_to_root'].'index.php'))) {
                    
314
                    
                
Tbx.php https://github.com/rogerwu99/punch_bantana.git | PHP | 179 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Date.php 2498 2006-12-23 22:13:38Z thomas $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
47     * Generates the tbx adapter
                    
48     * This adapter reads with php's xml_parser
                    
49     *
                    
73        if (!is_readable($filename)) {
                    
74            require_once 'Zend/Translate/Exception.php';
                    
75            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
geo_simple.php https://github.com/minoura/GeoSimple-Plugin.git | PHP | 149 lines
                    
1<?php
                    
2// 携帯ライブラリ
                    
2// 携帯ライブラリ
                    
3require_once(VENDORS.'ecw'.DS.'lib3gk.php');
                    
4
                    
67		// リンクを分解
                    
68		$parser = xml_parser_create();
                    
69		if(!xml_parse_into_struct($parser, $htmlLink, $vals, $index) || empty($vals)){
                    
71		}
                    
72		xml_parser_free($parser);
                    
73		
                    
                
acp_k_version_check.php https://github.com/dravekx/stargate-portal.git | PHP | 204 lines
                    
6* @copyright (c) 2007 StarTrekGuide
                    
7* @license http://opensource.org/licenses/gpl-license.php GNU Public License
                    
8*
                    
12*/
                    
13if (!defined('IN_PHPBB'))
                    
14{
                    
27		global $user, $template;
                    
28		global $phpbb_admin_path, $phpEx;
                    
29
                    
49			{
                    
50				include($phpbb_root_path . $mod_directory . $file . $phpEx);
                    
51
                    
127
                    
128				'U_AUTHOR'			=> 'http://www.phpbb.com/community/memberlist.php?mode=viewprofile&un=' . $var['author'],
                    
129			));
                    
                
XMLParser.php https://github.com/edmondscommerce/XAMPP-Magento-Demo-Site.git | PHP | 261 lines
                    
1<?php
                    
2/**
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
11 * send a note to license@php.net so we can mail you a copy immediately.
                    
12 *
                    
14 * @package    PEAR
                    
15 * @author     Greg Beaver <cellog@php.net>
                    
16 * @author     Stephan Schmidt (original XML_Unserializer code)
                    
17 * @copyright  1997-2008 The PHP Group
                    
18 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
19 * @version    CVS: $Id: XMLParser.php,v 1.13 2008/01/03 20:26:36 cellog Exp $
                    
30 * @copyright  1997-2008 The PHP Group
                    
31 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
32 * @version    Release: 1.7.2
                    
112        }
                    
113        xml_parser_free($xp);
                    
114        return true;
                    
                
Log.php https://github.com/bermi/akelos.git | PHP | 125 lines
                    
1<?php
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP version 5                                                        |
                    
5// +----------------------------------------------------------------------+
                    
9// | This LICENSE is in the BSD license style.                            |
                    
10// | http://www.opensource.org/licenses/bsd-license.php                   |
                    
11// |                                                                      |
                    
43//
                    
44// $Id: Log.php 42 2004-04-26 09:39:59Z clay $
                    
45//
                    
53/**
                    
54 * VersionControl_SVN_Log allows for XML formatted output. XML_Parser is used to 
                    
55 * manipulate that output.
                    
56 */
                    
57require_once 'XML/Parser.php';
                    
58
                    
                
Xml.hx https://github.com/steshaw/haxe-compiler-experiments.git | Haxe | 405 lines
                    
81		build = createDocument();
                    
82		var xml_parser = untyped __call__("xml_parser_create");
                    
83		untyped __call__("xml_set_element_handler", xml_parser, __start_element_handler, __end_element_handler);
                    
83		untyped __call__("xml_set_element_handler", xml_parser, __start_element_handler, __end_element_handler);
                    
84		untyped __call__("xml_set_character_data_handler", xml_parser, __character_data_handler);
                    
85		untyped __call__("xml_set_default_handler", xml_parser, __default_handler);
                    
85		untyped __call__("xml_set_default_handler", xml_parser, __default_handler);
                    
86		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_CASE_FOLDING"), 0);
                    
87		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_SKIP_WHITE"), 0);
                    
93
                    
94		if(1 != untyped __call__("xml_parse", xml_parser, str, true)) {
                    
95			throw "Xml parse error ("+untyped __call__("xml_error_string", __call__("xml_get_error_code", xml_parser)) + ") line #" + __call__("xml_get_current_line_number", xml_parser);
                    
97
                    
98		untyped __call__("xml_parser_free", xml_parser);
                    
99
                    
                
lib.xml.php https://github.com/cpg-contrib/coppermine.git | PHP | 347 lines
                    
1<?php
                    
2/*************************
                    
13  Coppermine version: 1.5.0
                    
14  $HeadURL: https://coppermine.svn.sourceforge.net/svnroot/coppermine/trunk/cpg1.5.x/include/lib.xml.php $
                    
15  $Revision: 5129 $
                    
18  ********************************************
                    
19  Code below has been taken from lib.xml.php and slightly modified for use with coppermine
                    
20  Orginal: http://www.phpclasses.org/browse/file/17412.html
                    
49 * @copyright 2007 ENDERLIN Ivan.
                    
50 * @since PHP4
                    
51 * @version 0.3
                    
120    $this->pOut = array();
                    
121    $this->parser = xml_parser_create();
                    
122
                    
122
                    
123    xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, 0);
                    
124    xml_parser_set_option($this->parser, XML_OPTION_TARGET_ENCODING, $encoding);
                    
                
utils.php https://gitlab.com/Blueprint-Marketing/wordpress-unit-tests | PHP | 365 lines
                    
1<?php
                    
2
                    
126// convert valid xml to an array tree structure
                    
127// kinda lame but it works with a default php 4 install
                    
128class testXMLParser {
                    
132	function testXMLParser($in) {
                    
133		$this->xml = xml_parser_create();
                    
134		xml_set_object($this->xml, $this);
                    
134		xml_set_object($this->xml, $this);
                    
135		xml_parser_set_option($this->xml,XML_OPTION_CASE_FOLDING, 0);
                    
136		xml_set_element_handler($this->xml, array(&$this, 'startHandler'), array(&$this, 'endHandler'));
                    
141	function parse($in) {
                    
142		$parse = xml_parse($this->xml, $in, sizeof($in));
                    
143		if (!$parse) {
                    
146			xml_get_current_line_number($this->xml)), E_USER_ERROR);
                    
147			xml_parser_free($this->xml);
                    
148		}
                    
                
CliDumperTest.php https://gitlab.com/dzakiafif/cokelatklasik | PHP | 353 lines
                    
1<?php
                    
2
                    
24    {
                    
25        require __DIR__.'/Fixtures/dumb-var.php';
                    
26
                    
26
                    
27        $dumper = new CliDumper('php://output');
                    
28        $dumper->setColors(false);
                    
42        $out = preg_replace('/[ \t]+$/m', '', $out);
                    
43        $intMax = PHP_INT_MAX;
                    
44        $res1 = (int) $var['res'];
                    
47
                    
48        if (PHP_VERSION_ID >= 50400) {
                    
49            $closure54 = <<<EOTXT
                    
124
                    
125        $var = xml_parser_create();
                    
126
                    
                
restore_includes.php https://github.com/dhamma-dev/SEA.git | PHP | 97 lines
                    
1<?php
                    
2
                    
30// Include all the backup needed stuff
                    
31require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
                    
32require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
                    
32require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
                    
33require_once($CFG->dirroot . '/backup/util/interfaces/executable.class.php');
                    
34require_once($CFG->dirroot . '/backup/util/interfaces/processable.class.php');
                    
34require_once($CFG->dirroot . '/backup/util/interfaces/processable.class.php');
                    
35require_once($CFG->dirroot . '/backup/backup.class.php');
                    
36require_once($CFG->dirroot . '/backup/util/structure/restore_path_element.class.php');
                    
36require_once($CFG->dirroot . '/backup/util/structure/restore_path_element.class.php');
                    
37require_once($CFG->dirroot . '/backup/util/helper/backup_file_manager.class.php');
                    
38require_once($CFG->dirroot . '/backup/util/helper/restore_prechecks_helper.class.php');
                    
38require_once($CFG->dirroot . '/backup/util/helper/restore_prechecks_helper.class.php');
                    
39require_once($CFG->dirroot . '/backup/util/helper/restore_moodlexml_parser_processor.class.php');
                    
40require_once($CFG->dirroot . '/backup/util/helper/restore_inforef_parser_processor.class.php');
                    
                
EbatNs_ResponseParser.php https://gitlab.com/endomorphosis/KindSupply | PHP | 490 lines
                    
1<?php 
                    
2// $Id: EbatNs_ResponseParser.php,v 1.1 2007/05/31 11:38:00 michael Exp $
                    
2// $Id: EbatNs_ResponseParser.php,v 1.1 2007/05/31 11:38:00 michael Exp $
                    
3/* $Log: EbatNs_ResponseParser.php,v $
                    
4/* Revision 1.1  2007/05/31 11:38:00  michael
                    
115				$typeFileName = basename($typeName);
                    
116				require_once $typeFileName . '.php';
                    
117			}
                    
174
                    
175            $parser = xml_parser_create($encoding);
                    
176            xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
180            
                    
181            if (!xml_parse($parser, $messageText, true)) {
                    
182                $errMsg = sprintf('XML error on line %d col %d byte %d %s',
                    
192            }
                    
193            xml_parser_free($parser);
                    
194            
                    
                
Parser.php https://gitlab.com/Gashler/dp | PHP | 407 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * A PHP-Based RSS and Atom Feed Framework.
                    
6 * Takes the hard work out of managing a complete RSS/Atom solution.
                    
41 * @link http://simplepie.org/ SimplePie
                    
42 * @license http://www.opensource.org/licenses/bsd-license.php BSD License
                    
43 */
                    
136		{
                    
137			$parser_check = xml_parser_create();
                    
138			xml_parse_into_struct($parser_check, '<foo>&amp;</foo>', $values);
                    
138			xml_parse_into_struct($parser_check, '<foo>&amp;</foo>', $values);
                    
139			xml_parser_free($parser_check);
                    
140			$xml_is_sane = isset($values[0]['value']);
                    
145		{
                    
146			$xml = xml_parser_create_ns($this->encoding, $this->separator);
                    
147			xml_parser_set_option($xml, XML_OPTION_SKIP_WHITE, 1);
                    
                
wpml-config.php https://gitlab.com/mostafame/team_website | PHP | 378 lines
                    
1<?php
                    
2
                    
6 * the language switcher configuration is not interpreted
                    
7 * the xml parser has been adapted from http://php.net/manual/en/function.xml-parse-into-struct.php#84261
                    
8 * many thanks to wickedfather at hotmail dot com
                    
47	 */
                    
48	protected function xml_parse( $xml, $context ) {
                    
49		$parser = xml_parser_create();
                    
49		$parser = xml_parser_create();
                    
50		xml_parser_set_option( $parser, XML_OPTION_CASE_FOLDING, 0 );
                    
51		xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );
                    
51		xml_parser_set_option( $parser, XML_OPTION_SKIP_WHITE, 1 );
                    
52		xml_parse_into_struct( $parser, $xml, $this->values );
                    
53		xml_parser_free( $parser );
                    
55		$this->index = 0;
                    
56		$arr = $this->xml_parse_recursive();
                    
57		$arr = $arr['wpml-config'];
                    
                
aioseop_performance.php https://gitlab.com/vanafroo/landingpage | PHP | 324 lines
                    
1<?php
                    
2/**
                    
202			if ( is_callable( 'exif_read_data' ) ) {
                    
203				$exif = __( 'Yes', 'all-in-one-seo-pack' ) . ' ( V' . $this->substr( phpversion( 'exif' ), 0, 4 ) . ')';
                    
204			} else {
                    
211			}
                    
212			if ( is_callable( 'xml_parser_create' ) ) {
                    
213				$xml = __( 'Yes', 'all-in-one-seo-pack' );
                    
235			$debug_info                   = array(
                    
236				__( 'Operating System', 'all-in-one-seo-pack' )            => PHP_OS,
                    
237				__( 'Server', 'all-in-one-seo-pack' )                      => $_SERVER['SERVER_SOFTWARE'],
                    
240				__( 'SQL Mode', 'all-in-one-seo-pack' )                    => $sql_mode,
                    
241				__( 'PHP Version', 'all-in-one-seo-pack' )                 => PHP_VERSION,
                    
242				__( 'PHP Allow URL fopen', 'all-in-one-seo-pack' )         => $allow_url_fopen,
                    
242				__( 'PHP Allow URL fopen', 'all-in-one-seo-pack' )         => $allow_url_fopen,
                    
243				__( 'PHP Memory Limit', 'all-in-one-seo-pack' )            => $memory_limit,
                    
244				__( 'PHP Max Upload Size', 'all-in-one-seo-pack' )         => $upload_max,
                    
                
wpml-config.php https://gitlab.com/Pibolo/plugin-wordpress.git | PHP | 341 lines
                    
1<?php
                    
2
                    
6 * the language switcher configuration is not interpreted
                    
7 * the xml parser has been adapted from http://php.net/manual/en/function.xml-parse-into-struct.php#84261
                    
8 * many thanks to wickedfather at hotmail dot com
                    
47	 */
                    
48	protected function xml_parse($xml, $context) {
                    
49		$parser = xml_parser_create();
                    
49		$parser = xml_parser_create();
                    
50		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
51		xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
                    
51		xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
                    
52		xml_parse_into_struct($parser, $xml, $this->values);
                    
53		xml_parser_free($parser);
                    
55		$this->index = 0;
                    
56		$arr = $this->xml_parse_recursive();
                    
57		$arr = $arr['wpml-config'];
                    
                
atomlib.php https://gitlab.com/endomorphosis/reservationtelco | PHP | 354 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * Atom Syndication Format PHP Library
                    
4 *
                    
5 * @package AtomLib
                    
6 * @link http://code.google.com/p/phpatomlib/
                    
7 *
                    
84
                    
85    var $FILE = "php://input";
                    
86
                    
113
                    
114        $parser = xml_parser_create_ns();
                    
115        xml_set_object($parser, $this);
                    
116        xml_set_element_handler($parser, "start_element", "end_element");
                    
117        xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
                    
118        xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
                    
                
Tbx.php https://gitlab.com/rsilveira1987/Expresso | PHP | 179 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Tbx.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
47     * Generates the tbx adapter
                    
48     * This adapter reads with php's xml_parser
                    
49     *
                    
73        if (!is_readable($filename)) {
                    
74            require_once 'Zend/Translate/Exception.php';
                    
75            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
Xml.hx https://github.com/MarcWeber/haxe-compiler-experiments.git | Haxe | 360 lines
                    
67	{
                    
68		return untyped __call__("str_replace", "'", '&apos;', __call__("htmlentities", value, __php__('ENT_COMPAT'), 'UTF-8'));
                    
69	}
                    
100		build = createDocument();
                    
101		var xml_parser = untyped __call__("xml_parser_create");
                    
102		untyped __call__("xml_set_element_handler", xml_parser, __start_element_handler, __end_element_handler);
                    
104		untyped __call__("xml_set_default_handler", xml_parser, __default_handler);
                    
105		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_CASE_FOLDING"), 0);
                    
106		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_SKIP_WHITE"), 0);
                    
112		if(1 != untyped __call__("xml_parse", xml_parser, str, true)) {
                    
113			throw "Xml parse error ("+untyped __call__("xml_error_string", __call__("xml_get_error_code", xml_parser)) + ") line #" + __call__("xml_get_current_line_number", xml_parser);
                    
114		}
                    
115
                    
116		untyped __call__("xml_parser_free", xml_parser);
                    
117
                    
                
Simple.php https://github.com/manoj240375/moodle_edify.git | PHP | 326 lines
                    
46 * @version   CVS: $Id: Simple.php,v 1.1 2009/06/22 18:35:56 stronk7 Exp $
                    
47 * @link      http://pear.php.net/package/XML_Parser
                    
48 */
                    
61 *
                    
62 * XML_Parser_Simple allows you to just implement one callback
                    
63 * for each tag that will receive the tag with its attributes
                    
68 *
                    
69 * class myParser extends XML_Parser_Simple
                    
70 * {
                    
93 * @version   Release: @package_version@
                    
94 * @link      http://pear.php.net/package/XML_Parser
                    
95 */
                    
95 */
                    
96class XML_Parser_Simple extends XML_Parser
                    
97{
                    
                
vfsStreamPrintVisitorTestCase.php https://github.com/theosp/google_appengine.git | PHP | 89 lines
                    
1<?php
                    
2/**
                    
20 */
                    
21class vfsStreamPrintVisitorTestCase extends \PHPUnit_Framework_TestCase
                    
22{
                    
37    {
                    
38        new vfsStreamPrintVisitor(xml_parser_create());
                    
39    }
                    
                
WMSDataParser.php git://github.com/modolabs/Kurogo-Mobile-Web.git | PHP | 304 lines
                    
282    public function parseData($contents) {
                    
283        $xml_parser = xml_parser_create();
                    
284
                    
285        // use case-folding so we are sure to find the tag in $map_array
                    
286        xml_parser_set_option($xml_parser, XML_OPTION_CASE_FOLDING, true);
                    
287        xml_parser_set_option($xml_parser, XML_OPTION_SKIP_WHITE, true);
                    
288
                    
289        $this->setEncoding(xml_parser_get_option($xml_parser, XML_OPTION_TARGET_ENCODING));
                    
290        
                    
293        
                    
294        if (!xml_parse($xml_parser, $contents)) {
                    
295            throw new KurogoDataException(sprintf("XML error: %s at line %d",
                    
298        }
                    
299        xml_parser_free($xml_parser);
                    
300    }
                    
                
Parser.php https://gitlab.com/yousafsyed/easternglamor | PHP | 173 lines
                    
1<?php
                    
2
                    
8/**
                    
9 * Parses incoming Xml into arrays using PHP's
                    
10 * built-in SimpleXML, and its extension via
                    
14 */
                    
15class Braintree_Xml_Parser
                    
16{
                    
                
XMLParser.php https://github.com/michaelmcandrew/citylink.git | PHP | 261 lines
                    
1<?php
                    
2/**
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
11 * send a note to license@php.net so we can mail you a copy immediately.
                    
12 *
                    
14 * @package    PEAR
                    
15 * @author     Greg Beaver <cellog@php.net>
                    
16 * @author     Stephan Schmidt (original XML_Unserializer code)
                    
17 * @copyright  1997-2008 The PHP Group
                    
18 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
19 * @version    CVS: $Id: XMLParser.php,v 1.13 2008/01/03 20:26:36 cellog Exp $
                    
30 * @copyright  1997-2008 The PHP Group
                    
31 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
32 * @version    Release: 1.7.1
                    
112        }
                    
113        xml_parser_free($xp);
                    
114        return true;
                    
                
StreamTest.php https://github.com/Exercise/zf2.git | PHP | 156 lines
                    
1<?php
                    
2/**
                    
36 */
                    
37class StreamWriterTest extends \PHPUnit_Framework_TestCase
                    
38{
                    
40    {
                    
41        $resource = xml_parser_create();
                    
42        try {
                    
48        }
                    
49        xml_parser_free($resource);
                    
50    }
                    
53    {
                    
54        $stream = fopen('php://memory', 'w+');
                    
55        new StreamWriter($stream);
                    
59    {
                    
60        new StreamWriter('php://memory');
                    
61    }
                    
                
Tmx.php https://github.com/jorgenils/zend-framework.git | PHP | 188 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2008 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Date.php 2498 2006-12-23 22:13:38Z thomas $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
47     * Generates the tmx adapter
                    
48     * This adapter reads with php's xml_parser
                    
49     *
                    
82        if (!is_readable($filename)) {
                    
83            require_once 'Zend/Translate/Exception.php';
                    
84            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
GsaFeedWriterTest.php https://gitlab.com/cuza/Clinic_Recods | PHP | 164 lines
                    
1<?php
                    
2
                    
11 */
                    
12class GsaFeedWriterTest extends \PHPUnit_Framework_TestCase
                    
13{
                    
84        // this will throw an exception if the xml is invalid
                    
85        new \SimpleXMLElement(file_get_contents($generatedFiles[0]), LIBXML_PARSEHUGE);
                    
86
                    
128        // this will throw an exception if the xml is invalid
                    
129        new \SimpleXMLElement(file_get_contents($generatedFiles[0]), LIBXML_PARSEHUGE);
                    
130        new \SimpleXMLElement(file_get_contents($generatedFiles[1]), LIBXML_PARSEHUGE);
                    
                
xml_test.php https://gitlab.com/x33n/platform | PHP | 187 lines
                    
1<?php
                    
2// $Id: xml_test.php 1787 2008-04-26 20:35:39Z pp11 $
                    
2// $Id: xml_test.php 1787 2008-04-26 20:35:39Z pp11 $
                    
3require_once(dirname(__FILE__) . '/../autorun.php');
                    
4require_once(dirname(__FILE__) . '/../xml.php');
                    
6
                    
7if (! function_exists('xml_parser_create')) {
                    
8    SimpleTest::ignore('TestOfXmlStructureParsing');
                    
                
Builder.php https://github.com/wokkie/sitellite.git | PHP | 519 lines
                    
16	var $extensions = array (
                    
17		'php' => '_php', // php script
                    
18		'tpl' => '_tpl', // xt template
                    
48		foreach ($dir->read_all () as $file) {
                    
49			if (strpos ($file, '.') === 0 || in_array ($file, array ('CVS', 'PEAR', 'Ext', 'pix', 'install', 'data', 'lang', 'modes.php', 'images.php', 'access.php')) || preg_match ('/\.(jpg|gif|png|css|js)$/i', $file)) {
                    
50				continue;
                    
64			) {
                    
65				if ($file == 'settings.php' && strstr ($path, 'forms')) {
                    
66					$regs[1] = 'settings';
                    
99	function _config ($file, $data) {
                    
100		// get app name from config.ini.php
                    
101		if (! @file_exists ($file)) {
                    
241				} elseif (strpos ($v, 'eval:') === 0) {
                    
242					$this->_php ($file, OPEN_TAG . ' ' . substr ($v, 5) . ' ' . CLOSE_TAG);
                    
243				}
                    
                
XmlTm.php https://gitlab.com/devtoannh/cafe | PHP | 139 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2011 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: XmlTm.php 23775 2011-03-01 17:25:24Z ralph $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
59        if (!is_readable($filename)) {
                    
60            require_once 'Zend/Translate/Exception.php';
                    
61            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
64        $encoding    = $this->_findEncoding($filename);
                    
65        $this->_file = xml_parser_create($encoding);
                    
66        xml_set_object($this->_file, $this);
                    
                
restore_includes.php https://gitlab.com/unofficial-mirrors/moodle | PHP | 100 lines
                    
1<?php
                    
2
                    
30// Include all the backup needed stuff
                    
31require_once($CFG->dirroot . '/backup/util/interfaces/checksumable.class.php');
                    
32require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
                    
32require_once($CFG->dirroot . '/backup/util/interfaces/loggable.class.php');
                    
33require_once($CFG->dirroot . '/backup/util/interfaces/executable.class.php');
                    
34require_once($CFG->dirroot . '/backup/util/interfaces/processable.class.php');
                    
34require_once($CFG->dirroot . '/backup/util/interfaces/processable.class.php');
                    
35require_once($CFG->dirroot . '/backup/backup.class.php');
                    
36require_once($CFG->dirroot . '/backup/util/structure/restore_path_element.class.php');
                    
36require_once($CFG->dirroot . '/backup/util/structure/restore_path_element.class.php');
                    
37require_once($CFG->dirroot . '/backup/util/helper/backup_anonymizer_helper.class.php');
                    
38require_once($CFG->dirroot . '/backup/util/helper/backup_file_manager.class.php');
                    
39require_once($CFG->dirroot . '/backup/util/helper/restore_prechecks_helper.class.php');
                    
40require_once($CFG->dirroot . '/backup/util/helper/restore_moodlexml_parser_processor.class.php');
                    
41require_once($CFG->dirroot . '/backup/util/helper/restore_inforef_parser_processor.class.php');
                    
                
lighthouse.php https://github.com/codebase/MoPCMS2.0.git | PHP | 219 lines
                    
86	 * xml2array() will convert the given XML text to an array in the XML structure.
                    
87	 * Link: http://www.bin-co.com/php/scripts/xml2array/
                    
88	 * Arguments : $contents - The XML text
                    
98
                    
99	    if(!function_exists('xml_parser_create')) {
                    
100	        //print "'xml_parser_create()' function not found!";
                    
103
                    
104	    //Get the XML parser of PHP - PHP must have this module for the parser to work
                    
105	    $parser = xml_parser_create('');
                    
105	    $parser = xml_parser_create('');
                    
106	    xml_parser_set_option($parser, XML_OPTION_TARGET_ENCODING, "UTF-8"); # http://minutillo.com/steve/weblog/2004/6/17/php-xml-and-character-encodings-a-tale-of-sadness-rage-and-data-loss
                    
107	    xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
107	    xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, 0);
                    
108	    xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1);
                    
109	    xml_parse_into_struct($parser, trim($contents), $xml_values);
                    
                
lib.php https://github.com/nicolasconnault/moodle2.0.git | PHP | 226 lines
                    
1<?php
                    
2/**
                    
25    echo '<div class="content">';
                    
26    if ($title) echo '<p class="return"><a href="index.php"><img src="return.gif" border="0"/></a></p>';
                    
27}
                    
34function end_interface ($ret = true) {
                    
35    if ($ret) echo '<p class="return"><a href="index.php"><img src="return.gif" border="0"/></a></p>';
                    
36    echo '</div>';
                    
122/**
                    
123 * convert a simple xml into php object
                    
124 *
                    
134    //create the parser
                    
135    $parser = xml_parser_create ();
                    
136    xml_set_default_handler ($parser,'basicxml_xml_to_object_aux');
                    
139    $index = array();
                    
140    xml_parse_into_struct($parser,$xml,$values,$index);
                    
141
                    
                
ubr_finished_lib.php https://gitlab.com/ppapadatis/Videolearn | PHP | 350 lines
                    
11//
                    
12//   Contributor: http://www.php.net/manual/en/function.xml-parse.php
                    
13//
                    
56// XML Parser
                    
57// Contributor: http://www.php.net/manual/en/function.xml-parse.php
                    
58/////////////////////////////////////////////////////////////////////
                    
124				// create the xml parser
                    
125				$this->XML_Parser = xml_parser_create('');
                    
126
                    
128				xml_set_object($this->XML_Parser, $this);
                    
129				xml_parser_set_option($this->XML_Parser, XML_OPTION_CASE_FOLDING, false);
                    
130				xml_set_element_handler($this->XML_Parser, "startHandler", "endHandler");
                    
138
                    
139				xml_parser_free($this->XML_Parser);
                    
140
                    
                
Xml.php https://github.com/wrobel/horde.git | PHP | 332 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * PHP version 5
                    
6 *
                    
119     *
                    
120     * @var Horde_Kolab_Format_Xml_Parser
                    
121     */
                    
168     *
                    
169     * @param Horde_Kolab_Format_Xml_Parser $parser  The XML parser.
                    
170     * @param Horde_Kolab_Format_Factory    $factory The factory for helper
                    
174    public function __construct(
                    
175        Horde_Kolab_Format_Xml_Parser $parser,
                    
176        Horde_Kolab_Format_Factory $factory,
                    
203     *
                    
204     * @return Horde_Kolab_Format_Xml_Parser The parser.
                    
205     */
                    
                
XmlTm.php https://gitlab.com/rsilveira1987/Expresso | PHP | 154 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: XmlTm.php 10020 2009-08-18 14:34:09Z j.fischer@metaways.de $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
46     * Generates the xmltm adapter
                    
47     * This adapter reads with php's xml_parser
                    
48     *
                    
74        if (!is_readable($filename)) {
                    
75            require_once 'Zend/Translate/Exception.php';
                    
76            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
manage.php https://github.com/nemein/openpsa.git | PHP | 415 lines
                    
1<?php
                    
2/**
                    
190
                    
191            $opml_parser = xml_parser_create();
                    
192            xml_parse_into_struct($opml_parser, $opml_data, $opml_values );
                    
207            }
                    
208            xml_parser_free($opml_parser);
                    
209
                    
                
facetservice.test.php https://github.com/kwijibo/trafficscotland-linkeddata.git | PHP | 100 lines
                    
1<?php
                    
2require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'constants.inc.php';
                    
2require_once dirname(dirname(__FILE__)) . DIRECTORY_SEPARATOR . 'constants.inc.php';
                    
3require_once MORIARTY_TEST_DIR . 'fakecredentials.class.php';
                    
4require_once MORIARTY_DIR . 'facetservice.class.php';
                    
5
                    
6class FacetServiceTest extends PHPUnit_Framework_TestCase {
                    
7
                    
80
                    
81  function test_parse_facet_xml_parses_facets() {
                    
82    $xml = '<facet-results xmlns="http://schemas.talis.com/2007/facet-results#"><head><query>dog</query><fields>tag</fields><top>10</top><output>xml</output></head><fields><field name="tag"><term value="dogs" number="5" facet-uri="http://api.talis.com/stores/kniblet-dev1/services/facet?fields=tag&amp;top=10&amp;output=xml&amp;query=dog+AND+tag%3A%22dogs%22" search-uri="http://api.talis.com/stores/kniblet-dev1/items?query=dog+AND+tag%3A%22dogs%22" /><term value="walking" number="2" facet-uri="http://api.talis.com/stores/kniblet-dev1/services/facet?fields=tag&amp;top=10&amp;output=xml&amp;query=dog+AND+tag%3A%22walking%22" search-uri="http://api.talis.com/stores/kniblet-dev1/items?query=dog+AND+tag%3A%22walking%22" /><term value="pets" number="1" facet-uri="http://api.talis.com/stores/kniblet-dev1/services/facet?fields=tag&amp;top=10&amp;output=xml&amp;query=dog+AND+tag%3A%22pets%22" search-uri="http://api.talis.com/stores/kniblet-dev1/items?query=dog+AND+tag%3A%22pets%22" /></field></fields></facet-results>';
                    
                
Xliff.php https://github.com/gryzz/crystal_magento.git | PHP | 220 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Xliff.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24#require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27#require_once 'Zend/Translate/Adapter.php';
                    
28
                    
50     * Generates the xliff adapter
                    
51     * This adapter reads with php's xml_parser
                    
52     *
                    
77        if (!is_readable($filename)) {
                    
78            #require_once 'Zend/Translate/Exception.php';
                    
79            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
FMResultSet.php https://github.com/renelof/CalendarSchedulerWeb.git | PHP | 281 lines
                    
1<?php
                    
2  require_once dirname(__FILE__) . '/../../Layout.php';
                    
2  require_once dirname(__FILE__) . '/../../Layout.php';
                    
3require_once dirname(__FILE__) . '/../../RelatedSet.php';
                    
4require_once dirname(__FILE__) . '/../../Record.php';
                    
4require_once dirname(__FILE__) . '/../../Record.php';
                    
5require_once dirname(__FILE__) . '/../../Field.php';
                    
6 class FileMaker_Parser_FMResultSet
                    
33} 
                    
34 $this->V5431b8d4= xml_parser_create('UTF-8');
                    
35xml_set_object($this->V5431b8d4, $this);
                    
35xml_set_object($this->V5431b8d4, $this);
                    
36xml_parser_set_option($this->V5431b8d4, XML_OPTION_CASE_FOLDING, false);
                    
37xml_parser_set_option($this->V5431b8d4, XML_OPTION_TARGET_ENCODING, 'UTF-8');
                    
39xml_set_character_data_handler($this->V5431b8d4, '_cdata'); 
                    
40 if (!@xml_parse($this->V5431b8d4, $V0f635d0e)) {
                    
41 return new FileMaker_Error($this->_fm,
                    
                
XMLParser.php https://github.com/vinnivinsachi/Vincent-DR.git | PHP | 261 lines
                    
1<?php
                    
2/**
                    
10 * the PHP License and are unable to obtain it through the web, please
                    
11 * send a note to license@php.net so we can mail you a copy immediately.
                    
12 *
                    
14 * @package    PEAR
                    
15 * @author     Greg Beaver <cellog@php.net>
                    
16 * @author     Stephan Schmidt (original XML_Unserializer code)
                    
17 * @copyright  1997-2006 The PHP Group
                    
18 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
19 * @version    CVS: $Id: XMLParser.php,v 1.11 2006/01/06 04:47:36 cellog Exp $
                    
30 * @copyright  1997-2006 The PHP Group
                    
31 * @license    http://www.php.net/license/3_0.txt  PHP License 3.0
                    
32 * @version    Release: 1.4.11
                    
112        }
                    
113        xml_parser_free($xp);
                    
114        return true;
                    
                
SystemStatus.php https://gitlab.com/ebrjose/comcebu | PHP | 341 lines
                    
1<?php
                    
2namespace AIOSEO\Plugin\Common\Tools;
                    
177					'header' => __( 'Operating System', 'all-in-one-seo-pack' ),
                    
178					'value'  => PHP_OS
                    
179				],
                    
196				[
                    
197					'header' => __( 'PHP Version', 'all-in-one-seo-pack' ),
                    
198					'value'  => PHP_VERSION
                    
200				[
                    
201					'header' => __( 'PHP Memory Limit', 'all-in-one-seo-pack' ),
                    
202					'value'  => ini_get( 'memory_limit' )
                    
204				[
                    
205					'header' => __( 'PHP Max Upload Size', 'all-in-one-seo-pack' ),
                    
206					'value'  => ini_get( 'upload_max_filesize' )
                    
208				[
                    
209					'header' => __( 'PHP Max Post Size', 'all-in-one-seo-pack' ),
                    
210					'value'  => ini_get( 'post_max_size' )
                    
                
update.php https://github.com/spn87/tt_tour.git | PHP | 180 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 * @version		$Id: update.php 20196 2011-01-09 02:40:25Z ian $
                    
4 * @package		Joomla.Framework
                    
6 * @copyright	Copyright (C) 2005 - 2011 Open Source Matters, Inc. All rights reserved.
                    
7 * @license		GNU General Public License, see LICENSE.php
                    
8 */
                    
162
                    
163		$this->xml_parser = xml_parser_create('');
                    
164		xml_set_object($this->xml_parser, $this);
                    
169		{
                    
170			if (!xml_parse($this->xml_parser, $data, feof($fp)))
                    
171			{
                    
176		}
                    
177		xml_parser_free($this->xml_parser);
                    
178		return true;
                    
                
Parser.php https://gitlab.com/staging06/myproject | PHP | 351 lines
                    
33 */
                    
34require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/Exception.php');
                    
35
                    
117                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/Atom.php');
                    
118                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/AtomElement.php');
                    
119                $class = 'XML_Feed_Parser_Atom';
                    
126                'http://purl.org/rss/1.0/')):
                    
127                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS1.php');
                    
128                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS1Element.php');
                    
142                $doc_element->namespaceURI == 'http://my.netscape.com/rdf/simple/0.9/'):
                    
143                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS09.php');
                    
144                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS09Element.php');
                    
168                }
                    
169                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2.php');
                    
170                require_once(_PS_PEAR_XML_PARSER_PATH_.'Parser/RSS2Element.php');
                    
                
Tbx.php https://gitlab.com/gregtyka/SiberianCMS | PHP | 166 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Tbx.php 24649 2012-02-26 03:37:54Z adamlundrigan $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
59        if (!is_readable($filename)) {
                    
60            require_once 'Zend/Translate/Exception.php';
                    
61            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
64        $encoding = $this->_findEncoding($filename);
                    
65        $this->_file = xml_parser_create($encoding);
                    
66        xml_set_object($this->_file, $this);
                    
                
Parser.php https://github.com/kjavitz/SalesIgniter1.git | PHP | 240 lines
                    
1<?php
                    
2
                    
9 * which accompanies this distribution, and is available at
                    
10 * http://www.opensource.org/licenses/eclipse-1.0.php
                    
11 * 
                    
11 * 
                    
12 * This is intended as a simple alternative to the PHP SimpleXML or DOM 
                    
13 * extensions (some of the machines I'm working on don't have the SimpleXML 
                    
25 */
                    
26QuickBooks_Loader::load('/QuickBooks/XML.php');
                    
27
                    
30 */
                    
31QuickBooks_Loader::load('/QuickBooks/XML/Node.php');
                    
32
                    
35 */
                    
36QuickBooks_Loader::load('/QuickBooks/XML/Document.php');
                    
37
                    
                
progressive_parser.class.php https://github.com/dhamma-dev/SEA.git | PHP | 283 lines
                    
55
                    
56    protected $xml_parser; // PHP's low level XML SAX parser
                    
57    protected $file;       // full path to file being progressively parsed | => mutually exclusive
                    
70    public function __construct($case_folding = false) {
                    
71        $this->xml_parser = xml_parser_create('UTF-8');
                    
72        xml_parser_set_option($this->xml_parser, XML_OPTION_CASE_FOLDING, $case_folding);
                    
130        }
                    
131        if (is_null($this->xml_parser)) {
                    
132            throw new progressive_parser_exception('progressive_parser_already_used');
                    
142        }
                    
143        xml_parser_free($this->xml_parser);
                    
144        $this->xml_parser = null;
                    
157    protected function parse($data, $eof) {
                    
158        if (!xml_parse($this->xml_parser, $data, $eof)) {
                    
159            throw new progressive_parser_exception(
                    
                
CliDumperTest.php https://gitlab.com/4gdevs/online-class-record-system | PHP | 386 lines
                    
1<?php
                    
2
                    
24    {
                    
25        require __DIR__.'/Fixtures/dumb-var.php';
                    
26
                    
26
                    
27        $dumper = new CliDumper('php://output');
                    
28        $dumper->setColors(false);
                    
42        $out = preg_replace('/[ \t]+$/m', '', $out);
                    
43        $intMax = PHP_INT_MAX;
                    
44        $res = (int) $var['res'];
                    
47
                    
48        if (PHP_VERSION_ID >= 50400) {
                    
49            $closure54 = <<<EOTXT
                    
122    {
                    
123        $var = xml_parser_create();
                    
124
                    
                
xml_rpc_codec.php https://github.com/agnesrambaud/yacs.git | PHP | 494 lines
                    
1<?php
                    
2/**
                    
4 *
                    
5 * @see services/codec.php
                    
6 * @see services/xml_rpc.php
                    
19	 *
                    
20	 * This script uses the standard XML parser included in the PHP library.
                    
21	 * The objective of the decoding functions is to transform the XML tree into stemming PHP arrays.
                    
56		// create a parser
                    
57		$parser = xml_parser_create();
                    
58		xml_set_object($parser, $this);
                    
62		// case is meaningful
                    
63		xml_parser_set_option($parser, XML_OPTION_CASE_FOLDING, FALSE);
                    
64
                    
67		$this->stack = array();
                    
68		if(!xml_parse($parser, $data)) {
                    
69
                    
                
Xliff.php https://github.com/basdog22/Qool.git | PHP | 230 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Xliff.php 24652 2012-02-26 04:49:45Z adamlundrigan $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
64        if (!is_readable($filename)) {
                    
65            require_once 'Zend/Translate/Exception.php';
                    
66            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
76        $this->_target = $locale;
                    
77        $this->_file   = xml_parser_create($encoding);
                    
78        xml_set_object($this->_file, $this);
                    
                
XML.php https://github.com/wokkie/sitellite.git | PHP | 287 lines
                    
1<?php
                    
2//
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP Version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2003 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 2.02 of the PHP license,      |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
10// | available at through the world-wide-web at                           |
                    
11// | http://www.php.net/license/2_02.txt.                                 |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
13// | obtain it through the world-wide-web, please send a note to          |
                    
14// | license@php.net so we can mail you a copy immediately.               |
                    
15// +----------------------------------------------------------------------+
                    
                
xml_test.php https://github.com/jonaustin/craigslist-housing-mapper.git | PHP | 178 lines
                    
1<?php
                    
2    // $Id: xml_test.php 4 2006-04-25 02:08:26Z phpnut $
                    
3    require_once(dirname(__FILE__) . '/../xml.php');
                    
5
                    
6    if (! function_exists('xml_parser_create')) {
                    
7        SimpleTest::ignore('TestOfXmlStructureParsing');
                    
                
XMLToArray.php https://github.com/yabba/openx.git | PHP | 128 lines
                    
1<?php
                    
2/*
                    
28 * A custom XML parser facility from 
                    
29 * http://www.devarticles.com/c/a/PHP/Converting-XML-Into-a-PHP-Data-Structure/
                    
30 */
                    
55        // set up a new XML parser to do all the work for us
                    
56        $this->parser = xml_parser_create();
                    
57        xml_set_object($this->parser, $this);
                    
57        xml_set_object($this->parser, $this);
                    
58        xml_parser_set_option($this->parser, XML_OPTION_CASE_FOLDING, false);
                    
59        xml_set_element_handler($this->parser, "startElement", "endElement");
                    
66        // parse the data and free the parser...
                    
67        xml_parse($this->parser, $xmlstring);
                    
68        xml_parser_free($this->parser);
                    
                
AmpacheApi.lib.php https://gitlab.com/x33n/ampache | PHP | 394 lines
                    
1<?php
                    
2/* vim:set softtabstop=4 shiftwidth=4 expandtab: */
                    
46    private $XML_subTag;
                    
47    private $XML_parser;
                    
48    private $XML_results;
                    
183
                    
184        $this->api_url = $protocol . $this->server . '/server/xml.server.php';
                    
185
                    
305
                    
306        if (!xml_parse($this->XML_parser, $response)) {
                    
307            $errorcode =  xml_get_error_code($this->XML_parser);
                    
310
                    
311        xml_parser_free($this->XML_parser);
                    
312        $this->_debug('PARSE RESPONSE', json_encode($this->XML_results));
                    
334    {
                    
335        $this->XML_parser = xml_parser_create();
                    
336        xml_parser_set_option($this->XML_parser,XML_OPTION_CASE_FOLDING,false);
                    
                
Tbx.php https://gitlab.com/grayhamster/open-social-media-monitoring | PHP | 166 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2012 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Tbx.php 24652 2012-02-26 04:49:45Z adamlundrigan $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
59        if (!is_readable($filename)) {
                    
60            require_once 'Zend/Translate/Exception.php';
                    
61            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
64        $encoding = $this->_findEncoding($filename);
                    
65        $this->_file = xml_parser_create($encoding);
                    
66        xml_set_object($this->_file, $this);
                    
                
Tokenizer.php https://github.com/vinnivinsachi/Vincent-DR.git | PHP | 372 lines
                    
1<?PHP
                    
2/* vim: set expandtab tabstop=4 shiftwidth=4: */
                    
3// +----------------------------------------------------------------------+
                    
4// | PHP Version 4                                                        |
                    
5// +----------------------------------------------------------------------+
                    
5// +----------------------------------------------------------------------+
                    
6// | Copyright (c) 1997-2002 The PHP Group                                |
                    
7// +----------------------------------------------------------------------+
                    
7// +----------------------------------------------------------------------+
                    
8// | This source file is subject to version 2.0 of the PHP license,       |
                    
9// | that is bundled with this package in the file LICENSE, and is        |
                    
10// | available at through the world-wide-web at                           |
                    
11// | http://www.php.net/license/2_02.txt.                                 |
                    
12// | If you did not receive a copy of the PHP license and are unable to   |
                    
13// | obtain it through the world-wide-web, please send a note to          |
                    
14// | license@php.net so we can mail you a copy immediately.               |
                    
15// +----------------------------------------------------------------------+
                    
                
Tmx.php https://github.com/bhaumik25/zend-framework.git | PHP | 156 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2007 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Date.php 2498 2006-12-23 22:13:38Z thomas $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Exception */
                    
27require_once 'Zend/Translate/Exception.php';
                    
28
                    
29/** Zend_Translate_Adapter */
                    
30require_once 'Zend/Translate/Adapter.php';
                    
31
                    
49     * Generates the tmx adapter
                    
50     * This adapter reads with php's xml_parser
                    
51     *
                    
                
_parse_propfind.php https://github.com/nadavkav/Moodle-RTL--Shenkar-Translation-Team-.git | PHP | 191 lines
                    
1<?php // $Id: _parse_propfind.php,v 1.1.2.2 2008/02/27 02:50:21 martinlanghoff Exp $
                    
2/*
                    
96        // create XML parser
                    
97        $xml_parser = xml_parser_create_ns("UTF-8", " ");
                    
98
                    
104        // we want a case sensitive parser
                    
105        xml_parser_set_option($xml_parser, 
                    
106                              XML_OPTION_CASE_FOLDING, false);
                    
113                $had_input = true;
                    
114                $this->success &= xml_parse($xml_parser, $line, false);
                    
115            }
                    
119        if ($had_input) {
                    
120            $this->success &= xml_parse($xml_parser, "", true);
                    
121        }
                    
123        // free parser
                    
124        xml_parser_free($xml_parser);
                    
125        
                    
                
_parse_propfind.php https://gitlab.com/tjaafar/SuiteCRM | PHP | 178 lines
                    
83		// create XML parser
                    
84		$xml_parser = xml_parser_create_ns("UTF-8", " ");
                    
85
                    
91		// we want a case sensitive parser
                    
92		xml_parser_set_option($xml_parser, 
                    
93							  XML_OPTION_CASE_FOLDING, false);
                    
100				$had_input = true;
                    
101				$this->success &= xml_parse($xml_parser, $line, false);
                    
102			}
                    
106		if($had_input) {
                    
107			$this->success &= xml_parse($xml_parser, "", true);
                    
108		}
                    
110		// free parser
                    
111		xml_parser_free($xml_parser);
                    
112		
                    
                
xml.php git://github.com/llaville/php-compat-info.git | PHP | 260 lines
                    
54     * @param string $version   OPTIONAL PHP version
                    
55     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
                    
56     *
                    
71     * @param string $version   OPTIONAL PHP version
                    
72     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
                    
73     *
                    
103     * @param string $version   OPTIONAL PHP version
                    
104     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
                    
105     *
                    
136     * @param string $version   OPTIONAL PHP version
                    
137     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
                    
138     *
                    
198     * @param string $version   OPTIONAL PHP version
                    
199     *                          (4 => only PHP4, 5 or null => PHP4 + PHP5)
                    
200     *
                    
                
Tmx.php https://github.com/Exercise/zf2.git | PHP | 235 lines
                    
1<?php
                    
2/**
                    
72        $encoding = $this->_findEncoding($filename);
                    
73        $this->_file = xml_parser_create($encoding);
                    
74        xml_set_object($this->_file, $this);
                    
74        xml_set_object($this->_file, $this);
                    
75        xml_parser_set_option($this->_file, XML_OPTION_CASE_FOLDING, 0);
                    
76        xml_set_element_handler($this->_file, "_startElement", "_endElement");
                    
78
                    
79        if (!xml_parse($this->_file, file_get_contents($filename))) {
                    
80            $ex = sprintf('XML error: %s at line %d',
                    
82                          xml_get_current_line_number($this->_file));
                    
83            xml_parser_free($this->_file);
                    
84            throw new Translator\Exception($ex);
                    
                
Xml.hx https://github.com/fullofcaffeine/vimpuccino.git | Haxe | 408 lines
                    
80		build = createDocument();
                    
81		var xml_parser = untyped __call__("xml_parser_create");
                    
82		untyped __call__("xml_set_element_handler", xml_parser, __start_element_handler, __end_element_handler);
                    
82		untyped __call__("xml_set_element_handler", xml_parser, __start_element_handler, __end_element_handler);
                    
83		untyped __call__("xml_set_character_data_handler", xml_parser, __character_data_handler);
                    
84		untyped __call__("xml_set_default_handler", xml_parser, __default_handler);
                    
84		untyped __call__("xml_set_default_handler", xml_parser, __default_handler);
                    
85		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_CASE_FOLDING"), 0);
                    
86		untyped __call__("xml_parser_set_option", xml_parser, __php__("XML_OPTION_SKIP_WHITE"), 0);
                    
92		if(1 != untyped __call__("xml_parse", xml_parser, str, true)) {
                    
93			throw "Xml parse error ("+untyped __call__("xml_error_string", __call__("xml_get_error_code", xml_parser)) + ") line #" + __call__("xml_get_current_line_number", xml_parser);
                    
94		}
                    
95
                    
96		untyped __call__("xml_parser_free", xml_parser);
                    
97
                    
                
Xliff.php https://github.com/manubamba/site.git | PHP | 220 lines
                    
1<?php
                    
2/**
                    
17 * @copyright  Copyright (c) 2005-2009 Zend Technologies USA Inc. (http://www.zend.com)
                    
18 * @version    $Id: Xliff.php 16971 2009-07-22 18:05:45Z mikaelkael $
                    
19 * @license    http://framework.zend.com/license/new-bsd     New BSD License
                    
23/** Zend_Locale */
                    
24require_once 'Zend/Locale.php';
                    
25
                    
26/** Zend_Translate_Adapter */
                    
27require_once 'Zend/Translate/Adapter.php';
                    
28
                    
50     * Generates the xliff adapter
                    
51     * This adapter reads with php's xml_parser
                    
52     *
                    
77        if (!is_readable($filename)) {
                    
78            require_once 'Zend/Translate/Exception.php';
                    
79            throw new Zend_Translate_Exception('Translation file \'' . $filename . '\' is not readable.');
                    
                
Simple.php https://github.com/SEA-DEVELOPMENT/4900.git | PHP | 326 lines
                    
46 * @version   CVS: $Id: Simple.php,v 1.2 2010/12/14 17:36:07 moodlerobot Exp $
                    
47 * @link      http://pear.php.net/package/XML_Parser
                    
48 */
                    
61 *
                    
62 * XML_Parser_Simple allows you to just implement one callback
                    
63 * for each tag that will receive the tag with its attributes
                    
68 *
                    
69 * class myParser extends XML_Parser_Simple
                    
70 * {
                    
93 * @version   Release: @package_version@
                    
94 * @link      http://pear.php.net/package/XML_Parser
                    
95 */
                    
95 */
                    
96class XML_Parser_Simple extends XML_Parser
                    
97{
                    
                
onyx-rss.php https://github.com/condesan/infoandina.git | PHP | 381 lines
                    
1<?php
                    
2
                    
22   define('ONYX_RSS_VERS', '1.0');
                    
23   define('ONYX_ERR_NO_PARSER', '<a href="http://www.php.net/manual/en/ref.xml.php">PHP\'s XML Extension</a> is not loaded or available.');
                    
24   define('ONYX_ERR_NOT_WRITEABLE', 'The specified cache directory is not writeable.');
                    
46   /* For when PHP v.5 is released
                    
47    * http://www.phpvolcano.com/eide/php5.php?page=variables
                    
48    * private $parser;
                    
60   // Forward compatibility with PHP v.5
                    
61   // http://www.phpvolcano.com/eide/php5.php?page=start
                    
62   function __construct()
                    
71
                    
72      if (!function_exists('xml_parser_create'))
                    
73      {
                    
360
                    
361         $req = "HEAD $path HTTP/1.1\r\nUser-Agent: PHP/".phpversion();
                    
362         $req.= "\r\nHost: $host\r\nAccept: */*\r\n\r\n";
                    
                
xml.php http://daipresents.googlecode.com/svn/trunk/ | PHP | 117 lines
                    
1<?php
                    
2###################################################################################
                    
4# XML Library, by Keith Devens, version 1.2b
                    
5# http://keithdevens.com/software/phpxml
                    
6#
                    
13# XML_unserialize: takes raw XML as a parameter (a string)
                    
14# and returns an equivalent PHP data structure
                    
15###################################################################################
                    
16function & XML_unserialize(&$xml){
                    
17	$xml_parser = &new XML();
                    
18	$data = &$xml_parser->parse($xml);
                    
18	$data = &$xml_parser->parse($xml);
                    
19	$xml_parser->destruct();
                    
20	return $data;
                    
22###################################################################################
                    
23# XML_serialize: serializes any PHP data structure into XML
                    
24# Takes one parameter: the data to serialize. Must be an array.
                    
                
SAML.php https://github.com/timdream/php-openid.git | PHP | 220 lines
                    
1<?php
                    
2/**
                    
2/**
                    
3 ** PHP versions 4 and 5
                    
4 **
                    
132
                    
133      $p=xml_parser_create();
                    
134      $result=xml_parse_into_struct($p,$responseXmlString,$vals,$index);
                    
134      $result=xml_parse_into_struct($p,$responseXmlString,$vals,$index);
                    
135      xml_parser_free($p);
                    
136      $cert_info=$index["X509CERTIFICATE"];
                    
                
Simple.php https://gitlab.com/raku.takayama/eccube-2_13 | PHP | 326 lines
                    
46 * @version   CVS: $Id: Simple.php 265444 2008-08-24 21:48:21Z ashnazg $
                    
47 * @link      http://pear.php.net/package/XML_Parser
                    
48 */
                    
61 *
                    
62 * XML_Parser_Simple allows you to just implement one callback
                    
63 * for each tag that will receive the tag with its attributes
                    
68 *
                    
69 * class myParser extends XML_Parser_Simple
                    
70 * {
                    
93 * @version   Release: @package_version@
                    
94 * @link      http://pear.php.net/package/XML_Parser
                    
95 */
                    
95 */
                    
96class XML_Parser_Simple extends XML_Parser
                    
97{
                    
                
atomlib.php https://github.com/weissms/owb-mirror.git | PHP | 313 lines
                    
1<?php
                    
2/*
                    
2/*
                    
3 * atomlib.php - Atom Syndication Format PHP Library
                    
4 *
                    
4 *
                    
5 * Project: http://code.google.com/p/phpatomlib/
                    
6 *
                    
43
                    
44    var $FILE = "php://input";
                    
45
                    
72
                    
73        $parser = xml_parser_create_ns();
                    
74        xml_set_object($parser, $this);
                    
75        xml_set_element_handler($parser, "start_element", "end_element");
                    
76        xml_parser_set_option($parser,XML_OPTION_CASE_FOLDING,0);
                    
77        xml_parser_set_option($parser,XML_OPTION_SKIP_WHITE,0);
                    
                
 

Source

Language