Lines Matching refs:xmlCode
29 public static function getElementOpenTag ($element, $xmlCode) { argument
31 if (preg_match ($pattern, $xmlCode, $matches) === 1) {
47 public static function getElement ($element, $xmlCode, &$endPos=NULL) { argument
48 if(empty($element) || empty($xmlCode)) {
52 $max = strlen ($xmlCode);
57 $start = strpos ($xmlCode, '<'.$element, $pos);
63 $next = $xmlCode [$start+$elementLength+1];
74 $angle = strpos ($xmlCode, '>', $pos);
82 if ($xmlCode [$angle-1] == '/') {
85 return substr ($xmlCode, $start, $angle-$start+1);
92 $end = strpos ($xmlCode, '</'.$element.'>', $pos);
100 return substr ($xmlCode, $start, $end-$start);
113 public static function getElementContent ($element, $xmlCode, &$endPos=NULL) { argument
114 if(empty($element) || empty($xmlCode)) {
118 $max = strlen ($xmlCode);
125 $start = strpos ($xmlCode, '<'.$element, $pos);
131 $next = $xmlCode [$start+$elementLength+1];
142 $angle = strpos ($xmlCode, '>', $pos);
150 if ($xmlCode [$angle-1] == '/') {
161 $end = strpos ($xmlCode, '</'.$element.'>', $pos);
173 return substr ($xmlCode, $contentStart, $contentEnd-$contentStart+1);
186 public static function getNextElementContent (&$element, $xmlCode, &$endPos=NULL) { argument
187 if(empty($xmlCode)) {
191 $max = strlen ($xmlCode);
197 $start = strpos ($xmlCode, '<', $pos);
203 if (XMLUtil::isValidXMLName ($xmlCode [$start+1])) {
207 while (XMLUtil::isValidXMLName ($xmlCode [$read])) {
208 $found_element .= $xmlCode [$read];
216 $next = $xmlCode [$start+$elementLength+1];
231 $angle = strpos ($xmlCode, '>', $pos);
239 if ($xmlCode [$angle-1] == '/') {
251 $end = strpos ($xmlCode, '</'.$found_element.'>', $pos);
264 return substr ($xmlCode, $contentStart, $contentEnd-$contentStart+1);
277 public static function getNextElement (&$element, $xmlCode, &$endPos=NULL) { argument
278 if(empty($xmlCode)) {
282 $max = strlen ($xmlCode);
286 $start = strpos ($xmlCode, '<', $pos);
292 if (XMLUtil::isValidXMLName ($xmlCode [$start+1])) {
296 while (XMLUtil::isValidXMLName ($xmlCode [$read])) {
297 $found_element .= $xmlCode [$read];
305 $next = $xmlCode [$start+$elementLength+1];
320 $angle = strpos ($xmlCode, '>', $pos);
328 if ($xmlCode [$angle-1] == '/') {
332 return substr ($xmlCode, $start, $angle-$start+1);
339 $end = strpos ($xmlCode, '</'.$found_element.'>', $pos);
348 return substr ($xmlCode, $start, $end-$start);
359 public static function elementReplace ($element, $xmlCode, $replacement) { argument
360 $start = strpos ($xmlCode, '<'.$element);
363 $empty = strpos ($xmlCode, '<'.$element.'/>');
365 return $xmlCode;
370 return str_replace('<'.$element.'/>', $replacement, $xmlCode);
372 $end = strpos ($xmlCode, '</'.$element.'>');
375 return $xmlCode;
378 return substr_replace ($xmlCode, $replacement, $start, $end-$start+$end_length);
389 public static function getAttributeValue ($attribute, $xmlCode) { argument
391 if (preg_match ($pattern, $xmlCode, $matches) === 1) {
407 public static function getAttributes (&$attributes, $xmlCode) { argument
409 if (preg_match_all ($pattern, $xmlCode, $matches, PREG_SET_ORDER) > 0) {