[TYPO3-german] how to use xml2array() ?

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


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
-- 
http://www.pi-phi.de/cheatsheet.html


More information about the TYPO3-german mailing list