Share » Forums » Install & configuration » ez : xml to html

ez : xml to html

ez : xml to html

Monday 24 April 2006 8:38:36 am - 8 replies

Author Message

Gabriel Ambuehl

Monday 24 April 2006 11:38:46 am

There's handlers for that in the kernel.

I think http://pubsvn.ez.no/doxygen/classeZXMLTextType.html#a15 could be the interface for it.

Visit http://triligon.org

Fred Gueho

Monday 24 April 2006 2: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 ?

Kirill Subbotin

Tuesday 25 April 2006 12: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.

Fred Gueho

Tuesday 25 April 2006 2:04:32 am

Thank you !!! I think it is exactly what I need !

Is there any documentation about this object ?

Thanks for your help.

Fred

Kirill Subbotin

Tuesday 25 April 2006 2:14:53 am

There are no docs, unfortunately, the only doc is the source code. But it is pretty obvious to use, I think.

Fred Gueho

Tuesday 25 April 2006 3:11:48 am

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

Fred Gueho

Tuesday 25 April 2006 5:24:36 am

Well, thank you Kirill, it works as expected. Exactly what I needed !

:)

nehal shah

Saturday 05 February 2011 2:54:46 am

Thanx Kirill.

This example is very useful. I want exactly this type of output and searching for many days.But finally i saw your example and tried it.This works fine.

Thanx again

You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu