Jump to content

Extract xml before conversion

- - - - -

This topic has been archived. This means that you cannot reply to this topic.
1 reply to this topic

#1
jonnyfolk

jonnyfolk

    Newbie

  • Members
  • Pip
  • 9 posts
Hi

I am interacting with a third party database, and they have sent me a php script for the search. The data is fetched via XsltProcessor and returned as HTML.

Is there a process by which I can extract the data before it is converted to html, either as xml or a data stream?

Thanks


	if ($strXML){

		$xml = new DOMDocument;

		$xml->loadXML( $strXML );

	

		$xsl = new DOMDocument;

		$xsl->load( $xmlpathtoxslfile );

	

		$xsltproc = new XsltProcessor();

		$xsltproc->importStyleSheet($xsl);

		$html = $xsltproc->transformToXML($xml);

	

		echo $html;

	}




#2
jonnyfolk

jonnyfolk

    Newbie

  • Members
  • Pip
  • 9 posts
Mmmm, my apologies - I am very inexperienced!! It seems to me now that the xml string is complete before going into the processor. I had thought that it was being added to via the xsl file but it would seem that that is not the case.

My bad!!!