f



PHP XML-XML curl function not working. Please help

Hi Everyone,

I'm trying to get the following php script to work with an ebay API. It 
sends XML and then returns XML and formats it into links. THing is it 
doesn;t work, and I'm not sure why. Can anyone see where I'm going 
wrong?

Thank you in advance,

Raj

<?php

$query = 'ipod';

$endpoint = 'http://open.api.ebay.com/shopping?';

$resp = 
simplexml_load_string(constructPostCallAndGetResponse($endpoint, 
$query));

if ($resp) {
	$results = '';

    foreach($resp->Item as $item) {
        $link  = $item->ViewItemURLForNaturalSearch;
        $title = $item->Title;

		$results .= "<a href=\"$link\">$title</a><br/>";
	}
}

else {
	$results = "Oops! Must not have gotten the response!";
}
?>

<!-- Build the HTML page with values from the call response -->
<html>
<head>
<title>
eBay Search Results for <?php echo $query; ?>
</title>
</head>
<body>

<h1>eBay Search Results for <?php echo $query; ?></h1>

<?php echo $results;?>

</body>
</html>

<?php

function constructPostCallAndGetResponse($endpoint, $query)
{
    $xmlRequest  = "<?xml version=\"1.0\" encoding=\"utf-8\"?>";
    $xmlRequest .= "<FindItemsAdvancedRequest 
xmlns=\"urn:ebay:apis:eBLBaseComponents\">";
    $xmlRequest .= "<QueryKeywords>";
    $xmlRequest .= $query;
    $xmlRequest .= "</QueryKeywords></FindItemsAdvancedRequest>";

    $session  = curl_init($endpoint);                       // create a 
curl session

    curl_setopt($session, CURLOPT_POST, true);      // POST request type
    curl_setopt($session, CURLOPT_POSTFIELDS, $xmlRequest); // set the 
body of the POST
    curl_setopt($session, CURLOPT_RETURNTRANSFER, true);    // return 
values as a string - not to std out
    $headers = array(
      'X-EBAY-API-CALL-NAME: FindItemsAdvanced',
      'X-EBAY-API-SITEID: 0',                                 // Site 0 
is for US
      'X-EBAY-API-APP-ID: My ID Goes Here. Removed for security',
      'X-EBAY-API-VERSION: 559',
      "X-EBAY-API-REQUEST-ENCODING: XML",
      'Content-Type: text/xml;charset=utf-8',
    );
    curl_setopt($session, CURLOPT_HTTPHEADER, $headers);    //set 
headers using the above array of headers

    $responseXML = curl_exec($session);                     // send the request
    curl_close($session);

    return $responseXML;  // returns a string
} // function
?>

0
raj694 (46)
4/11/2008 11:25:47 AM
comp.lang.php 32646 articles. 0 followers. Post Follow

2 Replies
928 Views

Similar Articles

[PageSpeed] 58

On 11 Apr, 12:25, raj <r...@nospam.com> wrote:
> Hi Everyone,
>THing is it doesn;t work, and I'm not sure why.

Based on the statement "it doesn't work", I can tell you hat there is
something wrong.

If you would care to give us more information about precisely in what
way "it doesn't work", such as what actually happens when you try it,
we will try to give more refined suggestions.

Garbage in - garbage out.

0
paul_lautman (2109)
4/11/2008 12:37:47 PM
raj escribi�:
> I'm trying to get the following php script to work with an ebay API. It 
> sends XML and then returns XML and formats it into links. THing is it 
> doesn;t work, and I'm not sure why. Can anyone see where I'm going wrong?

When I run the code you paste, the eBay server replies:

	Application ID invalid

>      'X-EBAY-API-APP-ID: My ID Goes Here. Removed for security',

Ah, yep, this must be the reason.

My guess is that you have some silly typo in your code but since your 
XML parser routines cannot handle error responses you don't even see the 
error message. Just try this to see raw XML:

echo constructPostCallAndGetResponse($endpoint, $query);

Next time try to change "does not work" with something more informative 
like "I see no error messages but the response is empty".



-- 
-- http://alvaro.es - �lvaro G. Vicario - Burgos, Spain
-- Mi sitio sobre programaci�n web: http://bits.demogracia.com
-- Mi web de humor al ba�o Mar�a: http://www.demogracia.com
--
0
4/11/2008 12:56:05 PM
Reply:

Similar Artilces:

Help PhP and XML !!
Hi, I am having a real nightmare working with XML data. I have the following code in my site: <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head> <title>Checker</title> </head> <body> <form style="WIDTH: 433px; HEIGHT: 540px" action="https://partners.enta.net/xml/ADSLChecker.php" method="get" name="ADSLChecker"> Telephone No <input name="PhoneNo"> <input type="submit" name="submit" value="Submit"> </form> </body> </html> The form works great, and returns a page with an XML Tree full of information but I cannot seem to work out how to capture the the XML data format it and then display the sections that I need for the user. I am probably missing something really obvious and any help will be greatly appreciated. Thanks in advance. PJ mkdirect@googlemail.com wrote: > I am having a real nightmare working with XML data. > > I have the following code in my site: > <input name="PhoneNo"> > <input type="submit" name="submit" value="Submit"> Your XHTML is invalid and not well-formed. Any XML parser is required to throw an error when dealing with it. > The form works great, and returns a page with a...

PHP/XML (or PHP/MySQL) CMS
I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for managing a large corporate website with a lot of different information. I have found some CMS, but they are just not good enough. Can you recommend one ? thanks in advance. Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > try www.mamboserver.com/ imho top-notch reg. sh -- "The goal of Computer Science is to build something that will last at least until we've finished building it." -- unknown Stefan Hegenbart wrote: >> I have found some CMS, but they are just not good enough. >> >> Can you recommend one ? >> > > try www.mamboserver.com/ > imho top-notch Or if you need something really mighty: www.typo3.org Nona Me wrote: > I'm looking for a PHP/XML CMS (or a PHP/MySQL CMS) for > managing a large corporate website with a lot of different information. > I have found some CMS, but they are just not good enough. > > Can you recommend one ? > > thanks in advance. > > > From - Thu ezPublish: http://www.ez.no/ ...

XML Newbie Alert! FOR XML EXPLICIT help please
Apologies for the newbie question. I have read and re-read about FOR XML EXPLICIT and now my head hurts! This is an example of the XML I am trying to form from a very simple SQL table: <Record> <RecordHeader> <HeaderData>HeaderStuff</HeaderData> <HeaderData2>HeaderStuff</HeaderData2> </RecordHeader> <RecordBody> <Body Data>BodyStuff</BodyData> <Body Data2>BodyStuff</BodyData2> </RecordBody> </Record> <Record> <RecordHeader> <HeaderData>HeaderStuff</HeaderData> <HeaderData2>HeaderStuff</HeaderData2> </RecordHeader> <RecordBody> <Body Data>BodyStuff</BodyData> <Body Data2>BodyStuff</BodyData2> </RecordBody> </Record> I have tried many variants of: select 1 as tag, NULL as parent, HeaderStuff AS [RecordHeader!1!HeaderData! element], HeaderStuff2 AS [RecordHeader!1!HeaderData2!element], BodyStuff [RecordBody!1!BodyData!element],BodyStuff2 [RecordBody!1! BodyData2!element] FROM tbl_test FOR XML EXPLICIT But am getting nowhere. I realise I am redeclaring XML tag ID1, but other variants I try are not much better!. Also, how do I get the <Record></Record> ? Can anyone help me? Thanks in advance if you can spare a minute for someone who needs help! iamaran <iamaranNOSPAM@hotmail.com> wrote in news:Xns9734C2086A447iamaranNOSPAMhotmail@62.253.170.163: <snip> So now I'm doin...

XML PHP
I am fairly familiar with PHP and MYSQL and I know a little about XML. I would like to know if it is possible to do queries on XML similar to the way that you do queries on MYSQL and then use the results. An example of a simple PHP/MYSQL setup. <?php $user="username"; $host="sqlserver"; $password="password"; $database="database"; $connection = mysql_connect($host,$user,$password) or die ("Couldn't connect to the server"); $db = mysql_select_db($database,$connection) or die ("Couldn't connect to the server"); $query = "SELECT * FROM database WHERE(Criteria)"; $result = mysql_query($query) or die ("Couldn't execute query."); while ($row = mysql_fetch_array($result)) { extract($row); echo"Set of instructions to carry out for each row in the result"; } ?> The question is, is it possible to do similar things with PHP/XML? Lets say that I have an XML file located at a certain URL and I want to run a query on it and use the results. 1. Is it possible? 2. What is the easiest way to do it? 3. How would I translate the above code to work with XML? 4. Is ther resource on the web on how to structure the queries? Any help is much appreciated. Rgds Joe On Thu, 13 Nov 2003 15:08...

XML to XML
I have a gnucash file that I'm trying to transform into an identical XML file without the invoices. I've been at this for a while now. The gnucash file is in XML and the element I'm looking into is: <gnc:transaction> I want to ignore those that contain <slot:key>gncInvoice</slot:key> which is a child of slot which is a child of slots which is a child of transactions. Any help you're willing to provide would be greatly appreciated. Thanks. Classic application for XSLT. Start with the identity transformation, then add a template which matches the ones you want to treat specially and yields no output. From your description that would be match="gnc:transaction[transactions/slots/slot/slot:key='gncInvoice']" with the namespaces declared appropriately in the stylesheet. (That looks like a somewhat unlikely markup design to me, but since I haven't played with gnucash at all I'm taking your word for it.) -- () ASCII Ribbon Campaign | Joe Kesselman /\ Stamp out HTML e-mail! | System architexture and kinetic poetry Actually, from the Relax-NG schema for gnucash, it looks like it should be more like "gnc:transaction[trn:slots/slot/slot:key='gncInvoice']" with gnc:, trn:, and slot: all bound to the appropriate namespace URIs. The fact that some of their elements -- eg <slot> -- aren't in any namespace is probably left over from a pre-namespaces initial design, as is their now-brok...

php and xml
newbie to this topic... I'm currently using php4.3.... which library is better to manipulate xml document in php language? how 'bout PEAR? tks laura ...

Php into XML
Heelo everybody. I am using XML and XSL to analyse a text. Now, I am trying to integrate php into the XML code, in order to make the XML page dynamic. Yet the parser doesn't even read the php code embedded in the xml page. Here is the beginning of my XML page, inf-dev.xml ----- ?xml version="1.0" encoding="UTF-8"?> <!DOCTYPE inferno SYSTEM "file:/Users/davidebenini/Documents/Universita%CC%80/Dottorato/inferno/inferno.dtd"> <?xml-stylesheet type="text/xsl" href="inf-dev.xslt"?> <inferno> <filtro>FILTRO: <?php echo "Filtro passsato in php"; ?>-</filtro> <canto> <n>1</n> <passo> <vv>1</vv> <dante> <v>Nel mezzo del cammin di nostra vita</v> </dante> <carson> <v>Halfway through the story of my life</v> </carson> <nota> <n>Carson introduce story</n> </nota> </passo> <passo> <vv>14</vv> <dante> <v>l� dove terminava quella valle</v> </dante> <carson> <v>hill; here, thre valley formed a cul-de-sac</v> </carson> ...

XML or not XML?
I am developing a simple MySQL database editor, and am looking into creating an PHP/AJAX app as the GUI. A lot of this in new ground, and much more is dusting off things I haven't used in a while. My question though involves whether or nor to employ XML. I did some XML a few years back, but don't typically bother anymore. As I see it XML is great when I need to have an app with a standard data presentation that other developers can easily interface. I.E. like a bank statement that may feed a variety of applications developed by a variety of clients. However, if I am developing an integrated solution that doesn't need that kind of ubiquity it just seems to add a layer of unnecessary complexity without any added benefit. I would like to hear some opinions on the pros and cons of using XML for PHP MySQL apps. On Dec 9, 9:54=A0am, William Gill <nore...@example.com> wrote: > I am developing a simple MySQL database editor, and am looking into > creating an PHP/AJAX app as the GUI. =A0A lot of this in new ground, and > much more is dusting off things I haven't used in a while. =A0My question > though involves whether or nor to employ XML. =A0I did some XML a few > years back, but don't typically bother anymore. =A0As I see it XML is > great when I need to have an app with a standard data presentation that > other developers can easily interface. =A0I.E. like a bank statement that > may feed a variety of applications...

Adressing node element when parsing xml with PHP and simple XML
I need to get the elements under this XML top structure using simplexml: <PKT> - <Result Name="GetTopWinnersForLastXMinutes" Success="1"> - <Returnset> - <Winner> I am trying to get the elements, associate them in one variable and foreach them under <Winner> like this: foreach($xml->Result.Returnset.Winner as $Winner) But the resulting page is blank. Could anyone please give me a hint? On 28 Nov 2009, Nosferatum <john.olav.o@gmail.com> wrote: > I need to get the elements under this XML top structure using > simplexml: > <PKT> > - <Result Name="GetTopWinnersForLastXMinutes" Success="1"> > - <Returnset> > - <Winner> > > I am trying to get the elements, associate them in one variable > and foreach them under <Winner> like this: > foreach($xml->Result.Returnset.Winner as $Winner) foreach ($xml->Result->Returnset->Winner as $Winner) { /* ... */ } > But the resulting page is blank. Could anyone please give me a > hint? In addition to the above, you can use XPath: <?php /* instantiate a SimpleXMLElement object ... */ $result = $xml->xpath('Result/Returnset/Winner'); foreach ($result as $node) { /* ... */ } ?> -- Curtis Dyer <? $x='<? $x=%c%s%c;printf($x,39,$x,39);?>';printf($x,39,$x,39);?&...

please help in socket_send function in php
Dear all, i want to send some unix commands to remote unix machine in france through php.i am using socket communication in php, i have written a socket communication program so that it connects to the remote machine. i dont get any errors it says socket is connected.i dont know whether the socket is connected or not. now i want to send username and password to that remote machine.i am using socket_send function. $username='abcd'; $output=socket_send($socket, $username, strLen($username),0); echo $output; what ever i send it returns the value integer.for example if i send $userna...

php and xml
hi, this is a bit of an advice thing. iv just finished a degree in multimedia, where i learned the usuals... html flash director javascript i also learned php and i have been told that i should get to grips with xml as this combination is verry useful so iv been messing arround with xml for the past couple of days trying to figure out how the two would work together. i just cant grasp the idea.. on thought i have had is that you could use php with a database to generate xml but surely that would not be parsed as xml as it would have the .php extension.. as i say im strugling to get this ...

PHP website SOAP help with XML
I am trying to setup my website linking up with a vendor. The vendor has xml feeds that are available via soap but I'm not sure how to integrate it into my site. They offer the below sample for soap 1.2. The url for the xml feeds are: http://xml.2buypcs.com/services/pcsdealers.asmx .. I was attempting to work with the parameter ImagesV2 and was unsuccessful. At the top of the page there is a link for service descriptions: http://xml.2buypcs.com/services/pcsdealers.asmx?WSDL This gives you the xml parameters but I can't make heads or tails out of it. The website I have is setup on Linux and is running PHP 5.1.4. Can anyone out there help me with getting this setup? I've been stuck for the past week and don't know how to continue. Thanks SOAP 1.2 The following is a sample SOAP 1.2 request and response. The placeholders shown need to be replaced with actual values. POST /services/pcsdealers.asmx HTTP/1.1 Host: xml.2buypcs.com Content-Type: application/soap+xml; charset=utf-8 Content-Length: length <?xml version="1.0" encoding="utf-8"?> <soap12:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap12="http:// www.w3.org/2003/05/soap-envelope"> <soap12:Body> <ImagesV2 xmlns="http://xml.2buypcs.com/"> <User>string</User> <Password>string</Password> <ImagesSi...

pls help sending xml using php
hi, i need to send an xml document to http://mygateway.com.. using php how can i do this? i already have the structure of the xml. all i need to do is fill up the fields and send. tnx shotokan99 wrote: > hi, > > i need to send an xml document to http://mygateway.com.. using php how > can i do this? i already have the structure of the xml. all i need to > do is fill up the fields and send. > > tnx Hi, Read up here: http://www.php.net/curl Regards, Erwin Moller this is how i handled this issue. is this a good approached? ======================================= $x...

TCL/PHP/XML problem: I need to convert an XML file into a TCL list
My TCL proc, XML_GET_ALL_ELEMENT_ATTRS, is supposed to convert an XML file into a TCL list as follows: attr1 {val1} attr2 {val2} ... attrN {valN} This is the TCL code that does this: [TCL] set contents [read $fileID [file size ${fileName}.xml]]; close $fileID if {![string equal $switch -body]} { # ONLY DO THIS IF THE XML CONTENTS CONTAIN NO BODY - WILL UPGRADE AT A LATER DATE 11/24/2006 - PHIL global serverName if {![info exists serverName]} { global env source ./cgi_globals.tcl global serverName } if {[string length [info procs {URL_ENCODE}]] == 0} { source ../url_procs.tcl }; # INCLUDE NEW url_procs.tcl URL TCL LIBRARY if {[string length [info procs {IS_LIST}]] == 0} { source {./tcl_string_tools.tcl} }; # INCLUDE THE TCL STRING LIBRARY CONTAINING PROC is_list IF !FOUND # BLOCK TO CREATE THE PHP SCRIPT TO PIPE INTO php.exe regsub -all {'} [XML_CLEANUP_ATTRIBUTE $contents] {\&#034;} phpEscapedContents regsub -all {"} $phpEscapedContents {\&quot;} phpEscapedContents set php {<? } append php [subst { if (@is_file("./functions.inc.php")) [format %c 123] }] append php { require_once("./functions.inc.php"); } append php [subst { echo xml_to_tcl_list("$phpEscapedContents"); }] append php [subst {[format %c 125] }] append php { ?>} set cannotRunPHP [catch {exec "echo '$php' | php" >@stdout 2>&stderr} errorMsg] if {$cannotRunPHP...

OpenVMS + PHP +XSL + DOM XML problem --> (cannot load/transform XML)
Hey! I have a problem loading (transforming) XML file using DOM XML extension on OpenVMS (alpha). I have installed libxml2, mysql, apache,... following steps described here (http://www.pi-net.dyndns.org/anonymous/kits/) All I want to do is: 1. build an XML from MySQL DB (functions like load, saveXML, appendChild, createElement are used) 2. Load an XSL file 3. transform XML with loaded XSL and show (echo) the result of the transformation My problem is that none of xmldom functions (which work on PHP 5) are supported. Why is that? Do I need some extension for domxml for OpenVMS? Where...

XML to XML newbee help
Hi, Me very confused. I have some XML that I want to convert to a more basic XML. I have put an example of what I have and what I want, I have used XSL to convert XML to HTML, but never this way. The <item numberingtext="10.01.01&#9;"> I want in the para tag I think, but if it has to be it own tag, no worrys. Any help would be fantastic Example of what I have: ========================= <?xml version="1.0" encoding="UTF-8" ?> <document xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:html="http://www.w3.org/HTML/1998/html4" xml:lang="en" style="widows: 0; orphans: 0; word-break-inside: normal; \-ilx-endnote-position: sectionbottom; \-ilx-endnote-style-type: lower-alpha; \-ilx-footnote-position: pagebottom; \-ilx-footnote-numbering-policy: continuous; \-ilx-endnote-numbering-policy: continuous; \-ilx-footnote-style-type: decimal;\-ilx-block-border-mode: merge;"> <part style="page: pageStyle1;"> <par class="Ahead">Duis autem vel eum iriure dolor in hendrerit in </par> <par class="Bhead">vulputate velit esse consequat</par> <par class="Normal" style="font-size: 12.0pt;"></par> <list style="margin-left: 18.0mm; list-style-type: decimal; \-ilx-list-group: 4; \-ilx-marker-align: left; \-ilx-marker-format: &quot;%0.%1.%0&quot;; \-ilx-marker-offset: -1020tw; \-ilx-marker-follo...

PHP: filesize of XML file increases exponentially
// PROCESS XML CONTENT INTO DYNAMICALLY-NAMED ARRAYS foreach (array('mime', 'state', 'country') as $val) { $parser = xml_parser_create(); xml_parser_set_option($parser, XML_OPTION_SKIP_WHITE, 1); xml_parse_into_struct($parser, ${$val . 'XML'}, ${$val . 'XMLArray'}, $tags); xml_parser_free($parser); $myXMLArray = ${$val . 'XMLArray'}; for ($i = 1; $i < @sizeof($myXMLArray) - 1; $i++) { if ($myXMLArray[$i]['attributes']['ABBREV']) { $this->{$val . 'Array'}['' . $myXMLArray[$i][...

embedding xml in xml as non-xml :)
Hi all, I have an application that logs in xml. Assume <xmlLog></xmlLog>. In this element the app logs anything it gets from foreign hosts. Now if the host sends xml data, the structure of the document changes. ie. <xmlLog><somTag></somTag></xmlLog>. This will cause problems with my log reader, because it assumes that <xmlLog/> contains non-xml data. My question is, is there a way to treat the data in the <xmlLog/> element as non xml data. Something I can do that would treat anything this element contains as a literal? Any help or suggestions would be greatly appreciated. Regards, Mark Mark Van Orman <mark@icsaccess.com> wrote: > Hi all, > > I have an application that logs in xml. > > Assume <xmlLog></xmlLog>. In this element the app logs > anything it gets from foreign hosts. Now if the host sends xml > data, the structure of the document changes. ie. > <xmlLog><somTag></somTag></xmlLog>. This will cause problems > with my log reader, because it assumes that <xmlLog/> contains > non-xml data. > > My question is, is there a way to treat the data in the > <xmlLog/> element as non xml data. Something I can do that > would treat anything this element contains as a literal? > > Any help or suggestions would be greatly ap...

how to parse an XML Feed in PHP 4.4 using curl without domxml_open_file()?
alllow_url_fopen if set to off. For some reason I can not access domxml_open_file(). And I need to read an xml feed. I can access the feed using cURL: $feed = curl_init("http://feddsitegoeshere"); curl_setopt($feed, CURLOPT_RETURNTRANSFER, 1); $p= curl_exec($feed); curl_close(); However, I am stuck here because I can't find anything to parse it since I can not use domxml_open_file(). Any ideas? Thanks! Hi, You can use a pure PHP XML parser like DOMIT! (http://freshmeat.net/projects/domit/). Or if you have access to the XML extension (php.net/xml) you can use that. Pa...

Help on including one XML document within another XML document using XML Schemas
Hi I would like to specify an XML schema that would allow an XML document to be included within another XML document. The following example schema gives an idea of what we're trying to achieve ServiceResponse.xsd -------------------- <?xml version="1.0" encoding="UTF-8"?> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" elementFormDefault="qualified" attributeFormDefault="unqualified"> <xs:element name="serviceResponse" type="ServiceResponse"/> <xs:complexType name="ServiceResponse"> <xs:sequence> <xs:element name="anXMLDocument" type="xs:string"/> <xs:element name="someOtherData" type="xs:string"/> </xs:sequence> </xs:complexType> </xs:schema> The element anXMLDocument would contain an XML data string that would be parsed against a different XML Schema. The identity of the XML Schema for parsing anXMLDocument is not known at the time the ServiceResponse XML is parsed. Previously when we used DTDs we used inline CDATA wrappers around the contained XML document to avoid it being parsed. Can we still continue to use inline CDATA wrappers around the XML data when we parse against XML schemas? I've tried looking into the XML Schema specs but the mention of CDATA seems a bit sparse and doesn't seem to answer the question. If we can't use an inline CDATA wrapper i...

no tags in my xml-to-xml transformation, help....
my xml-to-xml transformation is outputting an xml header and then just text like this: <?xml version="1.0" encoding="iso-8859-1"?>e19dbb7b-5529-43a0...... I've searched regarding this problem and it seems that if there's no match in your xsl template then by default everything gets spat out. But I've tested this with very definite matches in my template, and still there are no xml tags in the output. Has anyone seen this before? Any help much appreciated.... Yannick yannicklaclau wrote: > my xml-to-xml transformation is outputting an xml header and then just > text like this: > > <?xml version="1.0" encoding="iso-8859-1"?>e19dbb7b-5529-43a0...... > > I've searched regarding this problem and it seems that if there's no > match in your xsl template then by default everything gets spat out. > > But I've tested this with very definite matches in my template, and > still there are no xml tags in the output. > > Has anyone seen this before? We do not need to guess, try to reduce to the minimum necessary to show the problem, then post the relevant XML and XSLT here, and tell us which XSLT processor you use. -- Martin Honnen http://JavaScript.FAQTs.com/ Ok, false alarm. As I suspected, it was a newbie issue. In case anyone else has this problem, the solution is to use copy-of instead of value-of. Pretty self-explanatory: value-of will output the va...

Xml, Xschema and php
Someone could tell me how can I validate an xml file against an Xschema using php? Thanks and sorry for my little english. ------------------------------------- "Computer Science is no more about computers than astronomy is about telescopes." ::[E. W. Dijkstra] Xaradas wrote: > Someone could tell me how can I validate > an xml file against an Xschema using php? > > Thanks and sorry for my little english. > > ------------------------------------- > "Computer Science is no more about > computers than astronomy is about > telescopes." ...

PHP Sessions and XML
Could someone point me toward a very simple bare bones example of a PHP script for connecting to a server external to the one running the PHP script and accepting the small XML file that server will return? And maybe give me a few PHP keywords I can study for parsing that XML file? The XML file will contain a Session ID. So a few PHP keywords related to initiating a PHP session using that Session ID would be really helpful. Thank you. On 6/7/2012 3:27 PM, Jim Higgins wrote: > > Could someone point me toward a very simple bare bones example of a > PHP script for connecting to a server external to the one running the > PHP script and accepting the small XML file that server will return? > And maybe give me a few PHP keywords I can study for parsing that XML > file? > > The XML file will contain a Session ID. So a few PHP keywords related > to initiating a PHP session using that Session ID would be really > helpful. > > Thank you. These are pretty broad questions, so it's almost impossible to answer them exactly. Some hints - for fetching the page, the simplest way is to just fetch the URL using the file functions. However, your server would have to be configured to allow this (allow_url_fopen set to ON). Also, while this is a simple interface, it is pretty much limited to opening a file for read only - no cookies, etc. A more versatile (but a bit more complicated) way is to fetch the url ...

PHP and XML #2
Is there a module or library provided to PHP that parses XML? TIA w i l l w i l l: > Is there a module or library provided to PHP that parses XML? http://www.google.com/search?q=XML+site:www.php.net&l=en :P Andr� N�ss ...

Web resources about - PHP XML-XML curl function not working. Please help - comp.lang.php

Talk:Trigonometric functions - Wikipedia, the free encyclopedia
This article is within the scope of WikiProject Mathematics , a collaborative effort to improve the coverage of Mathematics on Wikipedia. If ...

Eating chocolate 'improves brain function' - study
... news for those with a sweet tooth - a recent study has found that regular chocolate consumption is associated with better cognitive function. ...

Using Functions to Make Better Abstractions
... (code that is tightly coupled to its own implementation details). I was wrong. I was wrong because I had an incomplete understanding of functions. ...

Cisco launches new network functions virtualization infrastructure solution to help service providers ...
Al-Bawaba Cisco launches new network functions virtualization infrastructure solution to help service providers run network ... Al-Bawaba ...

Google Maps for iOS adds detour function, 3D touch support
Google has extended its pit-stop feature the ability to find places to stop off on journeys to iPhone and iPad users with the release of Google ...

LVMH's Hublot May Be Next Brand for Smart Functions, Biver Says
Hublot will probably be the next LVMH watch brand to add smart functions, following TAG Heuer’s footsteps in combining Swiss craftsmanship and ...

Yahoo Begins Grim Job of Closing Functions, Laying Off Staff
Yahoo Food is closing, and other digital magazines on tech, travel and beauty are also scheduled for closing or major cutbacks.

Compliance Risk Study Shows Compliance Function Needs New Initiatives to Protect Its Hard-Won Gains
Financial institutions’ compliance functions have come a long way, but they still have some distance to travel before they reach the right strategic ...

A 3D Printed Jet Engine Appears to Function
... jet engine . You may remember seeing a 3D printed jet engine grace our front page back in October. That one was beautiful didn’t function . ...

‘World Of Warcraft’ Alpha Removes Gold From Garrison Missions, Water Striders No Longer Function Everywhere ...
... build deploying soon to the alpha server, garrison missions no longer reward gold and the water-walking Water Strider mounts no longer function ...

Resources last updated: 3/23/2016 6:27:54 PM