Tag Archives: xml

PHP Soumettre codes erronés à 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 

Continuer la lecture

Tagged , | Laisser un commentaire

Cannot display XML ,error at the end of document

Ceci est mon code

<?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'];
    

Continuer la lecture

Tagged , , | Laisser un commentaire

XML get value php

J'ai ce lien: http://www.geomojo.org/cgi-bin/reversegeocoder.cgi?long=9.013185&lat=46.189539
and i would like to get woeid with php.
Merci!!… Continuer la lecture

Tagged , , , , | Laisser un commentaire

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);

Y at-il Continuer la lecture

Tagged , , | Laisser un commentaire

Curl et htmlentities décapage des balises 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 parseContinuer la lecture

Tagged , , , | Laisser un commentaire

Iphone XML data accentuation?

I’m developing a project which fetch data from a php file(au format 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,en utilisant les… Continuer la lecture

Tagged , , , , | Laisser un commentaire

Convert XML file to CSV with Header in 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

Continuer la lecture

Tagged , , , , | Laisser un commentaire

quickly extract the contents of an xml tag in php

Scribd’s API returns XML, par exemple,:

<?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, qui est http://imgv2-4.scribdassets.com/img/word_document/60906103/111x142/79c5e6bab7/1327030759…? Continuer la lecture

Tagged , , | Laisser un commentaire

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>

Code PHP:

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

Continuer la lecture

Tagged , , | Laisser un commentaire

Get value XML with php [fermée]

Possible en double:

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>

Merci! Continuer la lecture

Tagged , , , | Laisser un commentaire
31 pages