[TYPO3-german] FlexForm im BE auslesen (was besseres als xml2tree bisher NICHT in der API).

Johannes Konert johanneskonert at gmx.de
Wed Jun 28 18:13:53 CEST 2006


hmmm, okay laut 
http://typo3.org/documentation/document-library/core-documentation/doc_core_api/current/view/7/1/

ist das xml2array wohl der "komfortabelste" Weg bisher...
Schade.
Aber wird gehen.


Zitat:
As you can see the format of the XML generated by t3lib_div::array2xml() 
is designed to reflect the array structures PHP can contain and thus the 
transformation to and from XML with the functions t3lib_div::array2xml() 
and t3lib_div::xml2array() is very easy and quick.

API functions for sheets

If you have a DS with sheets inside you might need to resolve the 
references:

<T3DataStructure>

   <sheets>

         <sDEF>fileadmin/sheets/default_sheet.xml</sDEF>

     <s_welcome>fileadmin/sheets/welcome_sheet.xml</s_welcome>

   </sheets>

</T3DataStructure>

This is done by t3lib_div::resolveSheetDefInDS() or 
t3lib_div::resolveAllSheetsInDS(). In fact, even if you don't have 
sheets in your file but just want to stay compatible with DS XML with 
sheets you should use this function. For instance these function calls 
will parse the DS into an array (screen shot above) and resolve the 
sheet definition, in this case creating a default sheet “sDEF” (screen 
shot below):

$treeDat = t3lib_div::xml2array($inputCode);

$treeDat = t3lib_div::resolveAllSheetsInDS($treeDat);



More information about the TYPO3-german mailing list