Subversion Repositories XServices

Rev

Rev 159 | Details | Compare with Previous | Last modification | View Log | RSS feed

Rev Author Line No. Line
159 brianR 1
<?xml version='1.0' encoding='utf-8'?>
2
<!DOCTYPE section [
3
<!ENTITY % myent SYSTEM "../entities.ent">
4
%myent;
5
]>
6
<section xmlns="http://docbook.org/ns/docbook" version="5.0"
7
	xmlns:xi="http://www.w3.org/2001/XInclude">
8
	<title>replaceNodes</title>
9
	<para>Replace an xml fragment with another xml fragment. This operation is namespace aware.
10
 
11
	Sample request:
12
<programlisting language="xml"><![CDATA[
13
<soapenv:Envelope xmlns:soapenv="http://schemas.xmlsoap.org/soap/envelope/"
14
xmlns:ws="http://ws.xservices.brutex.net">
15
   <soapenv:Header/>
16
   <soapenv:Body>
17
      <ws:replaceNodes>
18
         <sourcexml><![CDATA[
19
         <books>
20
			<author>
21
				<name>Mensiok</name>
22
				<surname>Bello</surname>
23
			</author>
24
			<author>
25
				<name>Schwab</name>
26
				<surname>Rumsau</surname>
27
			</author>
28
			<author>
29
				<name>Dollibert</name>
30
				<surname>Rach</surname>
31
			</author>
32
         </books>
33
         ]]]]><![CDATA[>
34
         </sourcexml>
35
         <encoding>utf-8</encoding>
36
         <namespaceList>
37
            <!--Zero or more repetitions:-->
38
            <namespace>
39
               <prefix></prefix>
40
               <uri></uri>
41
            </namespace>
42
         </namespaceList>
43
         <xpath>*/name[text()='Schwab']</xpath>
44
         <!--Optional:-->
45
         <xmldata><![CDATA[<name>Meyer</name><age>45</age><!--edited here-->]]]]><![CDATA[></xmldata>
46
      </ws:replaceNodes>
47
   </soapenv:Body>
48
</soapenv:Envelope>
49
]]></programlisting>
50
	Sample response:
51
	<programlisting language="xml"><![CDATA[
52
<soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
53
   <soap:Body>
54
      <ns2:replaceNodesResponse xmlns:ns2="http://ws.xservices.brutex.net">
55
         <return><![CDATA[<?xml version='1.0' encoding='UTF-8'?>
56
         <books>
57
			<author>
58
				<name>Mensiok</name>
59
				<surname>Bello</surname>
60
			</author>
61
			<author>
62
				<name>Meyer</name><age>45</age><!--edited here-->
63
				<surname>Rumsau</surname>
64
			</author>
65
			<author>
66
				<name>Dollibert</name>
67
				<surname>Rach</surname>
68
			</author>
69
         </books>]]]]><![CDATA[></return>
70
      </ns2:replaceNodesResponse>
71
   </soap:Body>
72
</soap:Envelope>]]></programlisting>
73
</para>
74
</section>