I would like to manage an xml string as the value of a property but only
manipulate the string in php code. I have created a property and a specialpage.
In the php code of the special page I can retrieve the xml string from the
SMWPropertyValue object:
$store = smwfGetStore();
$property = SMWPropertyValue::makeUserProperty('MyXMLProperty');
$dataValue[] = $store->getPropertyValues(NULL, $property, NULL, '');
In the php code I create an XML object from the string and add a child element
with some attributes. I am struggling to understand how to update the property
value with the updated xml string. I believe it might involve code like the
following.
$title = Title::newFromText('MyXMLProperty');
$id = $title->getArticleID();
$store->refreshdata($id, 1, false, false);
Is this a reasonable approach? Is this the best approach?
If this is the right approach I still have not succeeded in associating the
updated xml string with an appropriate element of the article or object
associated with the articleID so that the refresh actually changes the value.
Can anyone offer guidance or an example of php code that does this?
Thanks.
Alan
------------------------------------------------------------------------------
_______________________________________________
Semediawiki-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/semediawiki-devel