Subversion Repositories XServices

Rev

Go to most recent revision | View as "text/plain" | Blame | Compare with Previous | Last modification | View Log | Download | RSS feed

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE section [
<!ENTITY % myent SYSTEM "../entities.ent">
%myent;
]>
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
        xmlns:xi="http://www.w3.org/2001/XInclude">
        <title>replaceNodes</title>
        <para>Replace an xml fragment with another xml fragment. This operation is namespace aware.
        
        Sample request:
<programlisting language="xml"><![CDATA[
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/" 
xmlns:ws="http://ws.xservices.brutex.net">
   <soapenv:Header/>
   <soapenv:Body>
      <ws:replaceNodes>
         <sourcexml><![CDATA[
         <books>
                        <author>
                                <name>Mensiok</name>
                                <surname>Bello</surname>
                        </author>
                        <author>
                                <name>Schwab</name>
                                <surname>Rumsau</surname>
                        </author>
                        <author>
                                <name>Dollibert</name>
                                <surname>Rach</surname>
                        </author>
         </books>
         ]]]]><![CDATA[>
         </sourcexml>
         <encoding>utf-8</encoding>
         <namespaceList>
            <!--Zero or more repetitions:-->
            <namespace>
               <prefix></prefix>
               <uri></uri>
            </namespace>
         </namespaceList>
         <xpath>*/name[text()='Schwab']</xpath>
         <!--Optional:-->
         <xmldata><![CDATA[<name>Meyer</name><age>45</age><!--edited here-->]]]]><![CDATA[></xmldata>
      </ws:replaceNodes>
   </soapenv:Body>
</soapenv:Envelope>
]]></programlisting>
        Sample response:
        <programlisting language="xml"><![CDATA[
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
   <soap:Body>
      <ns2:replaceNodesResponse xmlns:ns2="http://ws.xservices.brutex.net">
         <return><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
         <books>
                        <author>
                                <name>Mensiok</name>
                                <surname>Bello</surname>
                        </author>
                        <author>
                                <name>Meyer</name><age>45</age><!--edited here-->
                                <surname>Rumsau</surname>
                        </author>
                        <author>
                                <name>Dollibert</name>
                                <surname>Rach</surname>
                        </author>
         </books>]]]]><![CDATA[></return>
      </ns2:replaceNodesResponse>
   </soap:Body>
</soap:Envelope>]]></programlisting>
</para>
</section>

Generated by GNU Enscript 1.6.5.90.