Thursday 01 June 2006 11:10:30 am
Greetings, Lukasz. Thanks for your reply. It looks like I did not provide enough information in the original post.
Say I have an article that is being published in eZ Publish. Lets say it contains a few attributes such as "Author", "Date", "Body" etc. What I need is to get these and build an XML that resembles this particular article. I.e. this XML has to be of the form:
<author> ... </author>
<date> ...</date> <body>...</body> ... Such file has to be build at the time of a publish. Another factor is that I have more than one content class that is supposed to be processed in this way. This makes my script a bit more complicated since the structure of the content class is not predefined. The code that you have provided prints out a number of parameters that seem to be related to the main page. This is what I am getting:
class ezcontentobjectattribute {
var $PersistentDataDirty = false;
var $HTTPValue = NULL;
var $Content = NULL;
var $DisplayInfo = NULL;
var $IsValid = NULL;
var $ContentClassAttributeID = '4';
var $ValidationError = NULL;
var $ValidationLog = NULL;
var $ContentClassAttributeIdentifier = 'name';
var $ContentClassAttributeCanTranslate = NULL;
var $ContentClassAttributeName = NULL;
var $ContentClassAttributeIsInformationCollector = NULL;
var $ContentClassAttributeIsRequired = NULL;
var $InputParameters = false;
var $HasValidationError = false;
var $DataTypeCustom = NULL;
var $ID = '1';
var $ContentObjectID = '1';
var $Version = '3';
var $LanguageCode = 'eng-CA';
var $AttributeOriginalID = '0';
var $SortKeyInt = '0';
var $SortKeyString = 'welcome to ez publish';
var $DataTypeString = 'ezstring';
var $DataText = 'Welcome to eZ publish';
var $DataInt = '0';
var $DataFloat = '0';
}class ezcontentobjectattribute {
var $PersistentDataDirty = false;
var $HTTPValue = NULL;
var $Content = NULL;
var $DisplayInfo = NULL;
var $IsValid = NULL;
var $ContentClassAttributeID = '155';
var $ValidationError = NULL;
var $ValidationLog = NULL;
var $ContentClassAttributeIdentifier = 'short_name';
var $ContentClassAttributeCanTranslate = NULL;
var $ContentClassAttributeName = NULL;
var $ContentClassAttributeIsInformationCollector = NULL;
var $ContentClassAttributeIsRequired = NULL;
var $InputParameters = false;
var $HasValidationError = false;
var $DataTypeCustom = NULL;
var $ID = '102';
var $ContentObjectID = '1';
var $Version = '3';
var $LanguageCode = 'eng-CA';
var $AttributeOriginalID = '0';
var $SortKeyInt = '0';
var $SortKeyString = 'ez publish';
var $DataTypeString = 'ezstring';
var $DataText = 'eZ publish';
var $DataInt = '0';
var $DataFloat = '0';
}class ezcontentobjectattribute {
var $PersistentDataDirty = false;
var $HTTPValue = NULL;
var $Content = NULL;
var $DisplayInfo = NULL;
var $IsValid = NULL;
var $ContentClassAttributeID = '119';
var $ValidationError = NULL;
var $ValidationLog = NULL;
var $ContentClassAttributeIdentifier = 'short_description';
var $ContentClassAttributeCanTranslate = NULL;
var $ContentClassAttributeName = NULL;
var $ContentClassAttributeIsInformationCollector = NULL;
var $ContentClassAttributeIsRequired = NULL;
var $InputParameters = false;
var $HasValidationError = false;
var $DataTypeCustom = NULL;
var $ID = '2';
var $ContentObjectID = '1';
var $Version = '3';
var $LanguageCode = 'eng-CA';
var $AttributeOriginalID = '0';
var $SortKeyInt = '0';
var $SortKeyString = '';
var $DataTypeString = 'ezxmltext';
var $DataText = '<?xml version="1.0" encoding="utf-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<paragraph>eZ publish is a popular open source content management system and development framework. It allows the development of professional, customized and dynamic web solutions. It can be used to build anything from a personal homepage to a multinational corporate website with role based multiuser access, online shopping, discussion forums and other advanced functionality. In addition, because of its open nature, eZ publish can easily be plugged into, communicate and coexist with existing IT-solutions.</paragraph>
</section>';
var $DataInt = '1045487555';
var $DataFloat = '0';
}lineclass ezcontentobjectattribute {
var $PersistentDataDirty = false;
var $HTTPValue = NULL;
var $Content = NULL;
var $DisplayInfo = NULL;
var $IsValid = NULL;
var $ContentClassAttributeID = '156';
var $ValidationError = NULL;
var $ValidationLog = NULL;
var $ContentClassAttributeIdentifier = 'description';
var $ContentClassAttributeCanTranslate = NULL;
var $ContentClassAttributeName = NULL;
var $ContentClassAttributeIsInformationCollector = NULL;
var $ContentClassAttributeIsRequired = NULL;
var $InputParameters = false;
var $HasValidationError = false;
var $DataTypeCustom = NULL;
var $ID = '104';
var $ContentObjectID = '1';
var $Version = '3';
var $LanguageCode = 'eng-CA';
var $AttributeOriginalID = '0';
var $SortKeyInt = '0';
var $SortKeyString = '';
var $DataTypeString = 'ezxmltext';
var $DataText = '<?xml version="1.0" encoding="utf-8"?>
<section xmlns:image="http://ez.no/namespaces/ezpublish3/image/"
xmlns:xhtml="http://ez.no/namespaces/ezpublish3/xhtml/"
xmlns:custom="http://ez.no/namespaces/ezpublish3/custom/">
<section>
<header>Documentation and guidance</header>
<paragraph>The
<link target="_blank"
url_id="1">eZ publish documentation</link> covers common topics related to the setup and daily use of the eZ publish content management system/framework. In addition, it also covers some advanced topics. People who are unfamiliar with eZ publish should at least read the "eZ publish basics" chapter.</paragraph>
<paragraph>If you're unable to find an answer/solution to a specific question/problem within the documentation pages, you should make use of the official
<link target="_blank"
url_id="4">eZ publish forum</link>. People who need professional help should purchase
<link target="_blank"
url_id="5">support</link> or
<link target="_blank"
url_id="6">consulting</link> services. It is also possible to sign up for various
<link target="_blank"
url_id="7">training sessions</link>.</paragraph>
<paragraph>
<line>For more information about eZ publish and other products/services from eZ systems, please visit
<link target="_blank"
url_id="8">ez.no</link>.</line>
</paragraph>
</section>
</section>';
var $DataInt = '1045487555';
var $DataFloat = '0';
}class ezcontentobjectattribute {
var $PersistentDataDirty = false;
var $HTTPValue = NULL;
var $Content = NULL;
var $DisplayInfo = NULL;
var $IsValid = NULL;
var $ContentClassAttributeID = '158';
var $ValidationError = NULL;
var $ValidationLog = NULL;
var $ContentClassAttributeIdentifier = 'show_children';
var $ContentClassAttributeCanTranslate = NULL;
var $ContentClassAttributeName = NULL;
var $ContentClassAttributeIsInformationCollector = NULL;
var $ContentClassAttributeIsRequired = NULL;
var $InputParameters = false;
var $HasValidationError = false;
var $DataTypeCustom = NULL;
var $ID = '108';
var $ContentObjectID = '1';
var $Version = '3';
var $LanguageCode = 'eng-CA';
var $AttributeOriginalID = '0';
var $SortKeyInt = '1';
var $SortKeyString = '';
var $DataTypeString = 'ezboolean';
var $DataText = '';
var $DataInt = '1';
var $DataFloat = '0'; } Or have I done something wrong? Thank you for your time.
|