I am having a problem with <@DOMINSERT> and using WiTango 5.0

I start with a 'blank' XML file that has only the root node of:
<WebSiteCommunityEvents />

I read this into a DOM by:
<@ASSIGN SCOPE="request" NAME="weXML" VALUE=<@DOM VALUE=<@INCLUDE 
FILE=/IntraNet/Company_Calendar/xmlfilename.xml>>> 

To insert to the DOM I use:
<@DOMINSERT OBJECT="weXML" SCOPE=request POSITION="append" 
ELEMENT="root()"><EVENT ID="@@request$eventid"><EVENTDATE><@ARG 
Event_Date></EVENTDATE><COMMUNITYID><@ARG 
WebSiteCommunity></COMMUNITYID><EVENTTITLE><@ARG 
WebSiteTitle></EVENTTITLE><EVENTDESCRIPTION><@ARG 
WebSiteDescription></EVENTDESCRIPTION></EVENT></@DOMINSERT>

After the INSERT, I then write the DOM back to the .xml file using a file 
action and the value:
<@VAR request$weXML ENCODING="NONE">


This works fine for the first two inserts. After that, it just overwrites the 
second event child instead of creating a third event child. I have added events 
one at a time and verified that it writes and then overwrites the second node 
on the next insert.

It should end up like this:
<WebSiteCommunityEvents>
        <EVENT ID="844">
                <EVENTDATE>07/07/2007</EVENTDATE>
                <COMMUNITYID>95A32E563D6C2BB58525704400483BD6</COMMUNITYID>
                <EVENTTITLE>r</EVENTTITLE>
                <EVENTDESCRIPTION>r</EVENTDESCRIPTION>
        </EVENT>
        <EVENT ID="845">
                <EVENTDATE>07/07/2007</EVENTDATE>
                <COMMUNITYID>23336E0D2401AE1D85256DB000606E4E</COMMUNITYID>
                <EVENTTITLE>t2</EVENTTITLE>
                <EVENTDESCRIPTION>t2</EVENTDESCRIPTION>
        </EVENT>
        <EVENT ID="846">
                <EVENTDATE>07/14/2007</EVENTDATE>
                <COMMUNITYID>498790E30B41E1D88525718E004BD1D4</COMMUNITYID>
                <EVENTTITLE>t34</EVENTTITLE>
                <EVENTDESCRIPTION>t3477</EVENTDESCRIPTION>
        </EVENT>
        <EVENT ID="847">
                <EVENTDATE>07/21/2007</EVENTDATE>
                <COMMUNITYID>61DE0C79457F567C85256DB000606E3E</COMMUNITYID>
                <EVENTTITLE>Tesat</EVENTTITLE>
                <EVENTDESCRIPTION>Tesat</EVENTDESCRIPTION>
        </EVENT>
</WebSiteCommunityEvents>


Instead, it looks like this:
<WebSiteCommunityEvents>
        <EVENT ID="844">
                <EVENTDATE>07/07/2007</EVENTDATE>
                <COMMUNITYID>95A32E563D6C2BB58525704400483BD6</COMMUNITYID>
                <EVENTTITLE>r</EVENTTITLE>
                <EVENTDESCRIPTION>r</EVENTDESCRIPTION>
        </EVENT>
        <EVENT ID="847">
                <EVENTDATE>07/21/2007</EVENTDATE>
                <COMMUNITYID>61DE0C79457F567C85256DB000606E3E</COMMUNITYID>
                <EVENTTITLE>Tesat</EVENTTITLE>
                <EVENTDESCRIPTION>Tesat</EVENTDESCRIPTION>
        </EVENT>
</WebSiteCommunityEvents>


Sorry for the long email, but has anyone seen this behavior before? I am not 
sure what else to look at.

Thanks for the help,

Steve Kevill
Web Developer 
The Fischer Group


________________________________________________________________________
TO UNSUBSCRIBE: Go to http://www.witango.com/developer/maillist.taf

Reply via email to