Archivo de la etiqueta: xml

PHP Submit Wrong codes to XML

i have an xml file (scores.xml) which im using a php codes to add new Tags to it.
i have a tag called Header which contain some html code

<![CDATA[<tr><td colspan='7' id='headertd'>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<img border='0' src='images/euro.png' />
&nbsp;&nbsp;&nbsp;&nbsp;
UEFA Euro 

Sigue leyendo

Etiquetado , | Deja un comentario

Cannot display XML ,error at the end of document

Este es mi código

<?php
$allBots = require_once 'botsPath.php';

$method = $_SERVER['REQUEST_METHOD'];
$request = explode("/", substr(@$_SERVER['PATH_INFO'], 1));
//var_dump($allBots);die;
$botName = array_shift($request);
$res = '';
$botJid = '';
$returnMessageTo = '';
if(isset($allBots[$botName])){
    require_once $allBots[$botName]['path'];
    $botObject = new $allBots[$botName]['class'];
    $botJid = $allBots[$botName]['jid'];
    

Sigue leyendo

Etiquetado , , | Deja un comentario

XML get value php

Tengo este enlace: http://www.geomojo.org/cgi-bin/reversegeocoder.cgi?long=9.013185&lat=46.189539
and i would like to get woeid with php.
Gracias!!… Sigue leyendo

Etiquetado , , , , | Deja un comentario

Remove text outside xml tags – PHP

Some times I receive text outside the xml tags in XML like this:

Bad command error. XYZ. Some more text<?xml version="1.0" encoding="utf-8"?><xml></xml>

This returns error in php. Because I am using this function to read the xml:

simplexml_load_string($xml);

¿Hay Sigue leyendo

Etiquetado , , | Deja un comentario

Curl y htmlentities pelar las etiquetas XML

So i’m working on a php script which passes information to a server using Curl and the POST method and then takes back information from that server in the form of XML.I then want to take this information and parseSigue leyendo

Etiquetado , , , | Deja un comentario

Iphone XML data accentuation?

I’m developing a project which fetch data from a php file(como XML).To be more clearly the app works like this:
1-Send an HTTP Request to a PHP file,which select data from a mysql database and display it as XML,utilizando el… Sigue leyendo

Etiquetado , , , , | Deja un comentario

Convertir archivo XML a CSV con cabecera en PHP

Need help to convert this xml file to csv….

<DATA>
  <CONTENT data="123456" data1="0"/>
  <CONTENT data="123456" data1="1"/>
  <CONTENT data="123456" data1="0"/>
</DATA>

The structure of csv:

data,data1
123456,0
123456,1
123456,0

Sigue leyendo

Etiquetado , , , , | Deja un comentario

quickly extract the contents of an xml tag in php

Scribd’s API returns XML, por ejemplo:

<?xml version="1.0" encoding="UTF-8"?><rsp stat="ok"><thumbnail_url>http://imgv2-4.scribdassets.com/img/word_document/60906103/111x142/79c5e6bab7/1327030759</thumbnail_url></rsp>

is there a way to quickly, say in one or two lines, get the contents of thumbnail_url, que es http://imgv2-4.scribdassets.com/img/word_document/60906103/111x142/79c5e6bab7/1327030759…? Sigue leyendo

Etiquetado , , | Deja un comentario

Accessing tags inside CDATA in XML using PHP

I am confused. How can I access tags inside CDATA?
XML Code:

<body>
<block>
<![CDATA[
     <font color="#FFCC53" size="+6"><b>Latest News Updates</b></font>
     <font color="#AAAAAA">HTML Formatted Text Fields</font>
]]>
</block>
</body>

Código PHP:

<?php
     $xml = simplexml_load_file("main.xml");
     print (  $xml->smallTextList[0]->item[0]->textBody[0]->font[0] ) ;
?>

Sigue leyendo

Etiquetado , , | Deja un comentario

Get value XML with php [cerrado]

Duplicar posibles:

SimpleXML parse Child of a Child
I would like to get the woeid in PHP from this xml.

<place>
<woeid>12892767</woeid>
<name>6500</name>
<type>Postal Code</type>
</place>

Gracias! Sigue leyendo

Etiquetado , , , | Deja un comentario
31 páginas