Tag Archives: xml

Read data from SQL server and convert it to XML in C#

Example code to Read data from SQL server and convert it to XML: using System; using System.Data; using System.Xml; using System.Data.SqlClient; using System.IO;   public class TestWriteXML { public static void Main() { String strFileName = c:/temp/out.xml; SqlConnection conn = … Continue reading

Posted in C# ADO.NET | Tagged , | Leave a comment

XML web services using visual studio2008

Create simple XML web services using visual studio2008

Posted in ASP.NET Videos | Tagged , | Leave a comment

XML-RPC Variable type detection

XML-RPC is clever enough to automatically detect the data type of the parameters passed to it in the xmlrpc_encode_request function. Example code: <?php $intvar = "77"; settype($intvar, "integer"); $req = xmlrpc_encode_request("NameOfRemoteCall’, $intvar); echo $req; ?> Output: <?xml version="1.0" encoding="iso-8859-1"?> <methodCall> … Continue reading

Posted in PHP XML | Tagged , , , | Leave a comment

Create an XML-RPC Request with xmlrpc_encode_request

The process to create an XML-RPC request can be broken up into individual steps: Serialize the PHP data into XML-RPC format Create an XML-RPC request by combining HTTP headers and serialized data Make the call to the service The PHP … Continue reading

Posted in PHP XML | Tagged , , , | Leave a comment

XML-RPC Array Data Type

In XML-RPC, Numerically indexed arrays are passed as a single structure within the value element. Arrays are defined with a specific structure of child elements. Example Declaration: <params> <param> <value> <array> <data> <value><string>Two</string></value> <value><boolean>1</boolean></value> <value><double>42.307400</double></value> </data> </array> </value> </param> </params> … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

XML-RPC Base64-Encoded Binary Data Type

To transfer binary information via XML-RPC we need to encode the data in base64 (serialization) and use the base64 tags as xml tags. Example Declaration: <param> <value> <base64>UHSYDhD1423Cc0Ad3NVP4OidTd8E1kRY5Edh</base64> </value> </param> Since PHP does not have a binary data type, developers … Continue reading

Posted in PHP XML | Tagged , , , | Leave a comment

XML-RPC Date/Time Data Type

An XML-RPC date/time data type is a primitive data type and specifies a date and a time value, up to the second. It follows the format YYYYMMDDTHH:MM:SS. using Year, month, day, hour, minute, and second conventions. The “T”, however, is … Continue reading

Posted in PHP XML | Tagged , , , | Leave a comment

XML-RPC Boolean Data Type

Boolean is a primitive data type and can take true or false state. XML-RPC boolean is same as the PHP boolean. In XML-RPC, booleans can only be represented with 1 or 0 unlike PHP where boolean can be represented by … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

XML-RPC Double Data Type

XML-RPC Double is a primitive data type and is the double precision signed floating point number. It is similar to float in PHP. From PHP 4 to PHP 5, the double data type has been deprecated in preference of float. … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

XML-RPC Integer Data Type

The integer is a primitive data type and is represented by a four byte signed integer. It is similar to the PHP data type integer. The integer tag can be represented as int or i4, for four byte integer. Example … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

XML-RPC String Data Type

The string data type is the basic text string and is a primitive data type. It is similar to the string data type in PHP. Example Declaration: <param> <value><string>Hello,Visitor!</string></value> </param> The string data type most common data type in XML-RPC … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

PHP XML-RPC Data Types

XML-RPC parameters can be one of the following three types. Scalars: basic primitive data types Arrays: numerically indexed arrays Structs: associative arrays Almost every value must be encapsulated by an element that declares what data type that value is.

Posted in PHP XML | Tagged , , | Leave a comment

PHP XML-RPC Responses

An XMP-RPC request can get two types of responses. One on successful execution of service, and one on erroring out. If an XML-RPC request was successful, we will receive the data we requested. If there was an error, a special … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

PHP XML-RPC Requests

XML-RPC requests are generally sent as HTTP POST requests and hence must have well formed HTTP POST headers. The actual remote call and parameters, in XML format, follows the header as the body of the HTTP request. POST /RPCexample HTTP/1.0 … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment

PHP XML-RPC Introduction

XML-RPC is an easy and useful data transport mechanism for web applications. Requests and responses are formatted in standard XML and are easy to parse. It is simple for clients and service providers to implement this protocol. Inbuilt PHP functions … Continue reading

Posted in PHP XML | Tagged , , | Leave a comment