← Back to team overview

dhis2-devs team mailing list archive

Re: XML Data import

 

Hi Charles,

In general, it should work to just mimick an export. Below is what I got
from the demo:

<?xml version="1.0" encoding="UTF-8"?>

-<dataValueSet dataSet="V8MHeZHIrcP" xmlns="http://dhis2.org/schema/dxf/2.0
">

<dataValue followUp="false" lastUpdated="2014-04-25T00:00:00"
storedBy="system" value="true" attributeOptionCombo="bRowv6yZOF2"
categoryOptionCombo="bRowv6yZOF2" orgUnit="ImspTQPwCqd" period="20141231"
dataElement="TLSChlBcw7L"/>

<dataValue followUp="false" lastUpdated="2014-04-25T00:00:00"
storedBy="system" value="true" attributeOptionCombo="bRowv6yZOF2"
categoryOptionCombo="bRowv6yZOF2" orgUnit="ImspTQPwCqd" period="20141231"
dataElement="MJYalhqFsHK"/>

<dataValue followUp="false" lastUpdated="2014-04-25T00:00:00"
storedBy="system" value="true" attributeOptionCombo="bRowv6yZOF2"
categoryOptionCombo="bRowv6yZOF2" orgUnit="ImspTQPwCqd" period="20141231"
dataElement="UMJym1vYPSu"/>

</dataValueSet>

On Sat, Jan 24, 2015 at 2:40 PM, Charles Bundu <rwige1@xxxxxxxxx> wrote:

> Dear Knut
>
> That is the approach I used in my XML file and still I don't get values
> for the field.
> How can I trigger the automation in XML?
>
> Regards
> Charles
> On 24 Jan 2015 16:32, "Knut Staring" <knutst@xxxxxxxxx> wrote:
>
>> Hi Charles,
>>
>> You don't have to include any values for those two fields - they will be
>> filled automatically.
>>
>> Knut
>>
>> On Sat, Jan 24, 2015 at 2:00 PM, Charles Bundu <rwige1@xxxxxxxxx> wrote:
>>
>>> Dear programmers;
>>>
>>> I am trying to use XML data import to import data in my DHIS2 database
>>> but i do not know which variable to use in my XML file so as to track
>>> record creation date and lastupdate date. As the system does when using
>>> Dataset (the image below shows the difference of the two approaches).
>>> Anyone with solution to this will be much appreciated.
>>>
>>>
>>>
>>> Regards
>>> Charles
>>>
>>> _______________________________________________
>>> Mailing list: https://launchpad.net/~dhis2-devs
>>> Post to     : dhis2-devs@xxxxxxxxxxxxxxxxxxx
>>> Unsubscribe : https://launchpad.net/~dhis2-devs
>>> More help   : https://help.launchpad.net/ListHelp
>>>
>>>
>>
>>
>> --
>> Knut Staring
>> Dept. of Informatics, University of Oslo
>> Norway: +4791880522
>> Skype: knutstar
>> http://dhis2.org
>>
>


-- 
Knut Staring
Dept. of Informatics, University of Oslo
Norway: +4791880522
Skype: knutstar
http://dhis2.org

PNG image


Follow ups

References