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
_______________________________________________
TYPO3-german mailing list
TYPO3-german@lists.typo3.org
http://lists.typo3.org/cgi-bin/mailman/listinfo/typo3-german

Antwort per Email an