Sorry about the html mail.
How about I show the XMLRPC call. Consider the following XMLRPC call to insert a document
<?xml version="1.0" encoding="UTF-8"?>
<methodCall>
<methodName>run</methodName>
<params>
<param>
<value>
<struct>
<member>
<name>message</name>
<value>
<string>InsertDocument</string>
</value>
</member>
<member>
<name>collection</name>
<value>
<string>/db/test</string>
</value>
</member>
<member>
<name>name</name>
<value>
<string>mydoc</string>
</value>
</member>
<member>
<name>document</name>
<value>
<string><![CDATA[<root><doc>something</doc></root>]]></string>
</value>
</member>
</struct>
</value>
</param>
</params>
</methodCall>Notice for the document value that I am specifying a CDATA tag. I need to do this because if the call were the following:
<string><root><doc>something</doc></root></string>
Then only the something would be retrieved and not the root and doc tags. The code is message.get(DOCUMENT), which does not retrieve the correct information.
Is this normal?
At 17:56 12/29/2002 +0100, you wrote:
Christian Gross wrote:When I insert a document using my xindice function that calls using XML-RPC I need a CDATA section as follows:
xindice.Insert( String( "/db/test"), String( "mydoc"), String( "<![CDATA[<root><doc>something</doc></root>]]>"));
Without the CDATA section I get a document parse error since the XML tags are not visible.
Document doc = DOMParser.toDocument((String) message.get(DOCUMENT));
Specifically the message.get(DOCUMENT) line returns the incorrect data.
Is this an intended feature? BTW I checked to see if this was an XMLRPC failure, but the XMLRPC call includes the XML tags.
(please, Christian, try to avoid HTML mail)
I don't get what you are trying to do. I assume that you made a function with the signature Insert(String collection, String key, String document). If that's the case, you are trying to insert an empty XML document, since there is no root element (all you have is a CDATA tag). What am I'm missing?
Ciao,
-- Gianugo Rabellino
Christian Gross Software Engineering Consultant / Trainer http://www.devspace.com North America: 1-450-675-4208 Europe: +41.1.701.1166
