[TYPO3-german] wie benutze ich xml2array() ?

bernd wilke t3ng at bernd-wilke.net
Mon Dec 1 09:40:09 CET 2014


Am 01.12.14 09:35, schrieb bernd wilke:
> I'm trying to use \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array() to
> analyse a fluid-template.
>
> first problem were the namespace declarations in the beginning of the
> template. But removing them with preg_replace() solved this.
>
>
> Now I get the Error
> | Line 2: Invalid document end
>
> can't xml2array() handle tags over multiple lines?
>
> my (remaining) document starts with:
>
> | <f:layout name="Content" />
> | <div xmlns="http://www.w3.org/1999/xhtml"
> |      xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
> |      xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
> |      xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
> |
> |     <f:section name="Configuration">
> |       :
>
>
> BTW: I can't figure about the second paramter of xml2array():
> what is it for?
> how can I use it?
>
> bernd

oops, falsche Sprache für diese NG (oder falsche NG).
in deutsch:
ich versuche mit \TYPO3\CMS\Core\Utility\GeneralUtility::xml2array() ein 
Fluid-Template zu analysieren.

das erste Problem waren die Namespace-Deklarationen. Das konnte ich aber 
mit preg_replace() lösen.

allerdings erhalte ich jetzt den Fehler:
| Line 2: Invalid document end

kann xml2array() keine mehrzeiligen Tags?

Der Anfang meines Dokuments (nach dem preg_replace()):

| <f:layout name="Content" />
| <div xmlns="http://www.w3.org/1999/xhtml"
|      xmlns:flux="http://fedext.net/ns/flux/ViewHelpers"
|      xmlns:v="http://fedext.net/ns/vhs/ViewHelpers"
|      xmlns:f="http://typo3.org/ns/fluid/ViewHelpers">
|
|     <f:section name="Configuration">
|       :


BTW: Ich verstehe immer noch nicht den zweiten Parameter von xml2array():
Wofür/Wie kann/muss man ihn benutzen?

bernd
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-german mailing list