Gerry - in your StartNode in the XMAP file, add a root element in the Xpath.
Example:  If StartNode contains "List", change it to "Lists/List". That
should do it.

Scott T.

-----Original Message-----
From: [EMAIL PROTECTED]
[mailto:[EMAIL PROTECTED] On Behalf Of gerry-u2ug
Sent: Tuesday, June 05, 2007 9:09 AM
To: [email protected]
Subject: [U2] From SOAP on to XML

Thanks to everyone that responded to my SOAP questions.
Now it's on to some XML processing.

I am having some problem understanding how to get the XMAPAppendRec()
function to work properly.
Leaving out all of the gory details , basically I have XML.map & XML.ext
files setup to allow parsing of the following xml :
<List>
        <Item>
                <ID>1</ID>
                <Name>One</Name>
        </Item>
        <Item>
                <ID>2</ID>
                <Name>Two</Name>
        </Item>
</List>

using XDOMOpen , XDOMLocate , XMAPOpen , XMAPReadNext works very well to
get the data out of the xml document.

I am trying to copy the source document to a new document using
XMAPCreate +
        St=XMAPReadNext(srcHandle,xfile,rec)
        St=XMAPAppendRec(dstHandle,xfile,rec)
This sort of works for the 1st append , XMAPToXmlDoc shows that the
result contains :
<Item>
        <ID>1</ID>
        <Name>One</Name>
</Item>
However, as you can see, there is no root node created, so appending the
second record generates a "can only have one root node" error.
I can't see how to get the document root into the result document.

Can anyone offer any pointers on this ?


Gerry
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/


-- NOTICE -- 
The information transmitted is intended only for the person or
entity to which it is addressed and may contain confidential and/or
privileged material, the disclosure of which is governed by
applicable law. Any review, retransmission, dissemination or other
use of, or taking of any action in reliance upon, this information
by persons or entities other than the intended recipient is
prohibited. If you received this in error please contact the sender
and destroy the materials contained in this message.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to