Monday 24 April 2006 5:38:36 pm - 8 replies
Hi all,
With PHP, I get some xml content in the database.
And I need to ouput this content in html (the ezpublish xml tags are not all html tags).
Are there any php ezpublish objects or function I can use to do so ?
Like (it's a fake example) :
include_once("lib/ezdb/classes/ezxml2html.php"
;
$xml2html =& eZXML2HTML::instance();
$ouput =& $xml2html->getHtml($myXml);
I'm sure there are premade objects I can use, but I just can't find them.
Thanks for your help.
Monday 24 April 2006 8:38:46 pm
There's handlers for that in the kernel.
I think http://pubsvn.ez.no/doxygen/classeZXMLTextType.html#a15 could be the interface for it.
Monday 24 April 2006 11:01:15 pm
Hi,
Thanks for your help.
What I need is the object/function that output XHTML format (from xml content object).
Example :
it will take an ezXml object like :
<header>This is a level one header</header>
<paragraph>This is a <emphasize>block</emphasize> of text.</paragraph>
and output it in xhtml :
<h1>This is a level one header</h1>
<p>This is a <em>block</em> of text.</p>
What object/function should I use ?
Tuesday 25 April 2006 9:43:53 am
Here is a simple example:
include_once('kernel/classes/datatypes/ezxmltext/handlers/output/ezxhtmlxmloutput.php');
$XMLContent = "<section><paragraph>text</paragraph></section>";
$outputHandler = new eZXHTMLXMLOutput( $XMLContent, false, $contentObjectAttribute );
$htmlContent =& $outputHandler->outputText();
I didn't test it, but this should work.
ps. Object attribute is needed here, but probably you can skip this by modifying handler's code, it is not so very much used there.
Modified on Tuesday 25 April 2006 9:44:12 am by Kirill Subbotin
Tuesday 25 April 2006 12:11:48 pm
Well, I don't need the doc for this particular object but I have done extensive search in http://pubsvn.ez.no/doxygen to find the right object to output XHTML and I haven't found it. Because it's not there !
So I'm a bit disapointed by this documentation that doesn't provide all the API.
And I was asking if there was a place where ALL the objects were documented. So that I can find what I need by myself without bothering you and the forum ![]()
Thanks.
Fred
You must be logged in to post messages in this topic!