Archives by Tag 'XML'

Sometimes, we want to make a service available in different protocols so that clients could have an option to choose one of their favorite methods to consume the web services. Here we are going to talk about how to make one WCF service available in POX(Plain Old XML as XML for short), JSON and SOAP […]

When deserialize XML into object, the object’s property becomes an empty list even if the property is absence from the XML, the expected behavior is the property is null. For example, given a class public class MyFoo { public string Id { get; set; } […]

In order to join a sequence with a customized separator in XSLT 1.0, similar to C# function string.Join( array, separator), I’ve come up with a template which takes the sequence and separator as parameter. Given a sample XML <?xml version=”1.0″ encoding=”utf-8″ ?> <?xml-stylesheet type=”text/xsl” href=”ElementJoin.xslt”?> <Root> <Years> <int>2008</int> <int>2009</int> […]

I’ve done some quick test on WCF interoperability of the SOAP versions and WSAddressing. SOAP 1.1 vs SOAP 1.2 SOAP 1.2 is an extended version of SOAP 1.1, it does everything that SOAP 1.1 offers, SOAP 1.2 provides clear processing model and it is based on XML infoset, it has no dependency on the underlying […]

I’ve run some tests on transformation from one XML schema to the other so that I can compare the performance between XSLT and XmlSerializer with object mapping as well as the Pros and Cons. It appears XSLT transformed my source XML to target XML faster than the object mapping since XSLT doesn’t take the type […]

Elements way is good at interoperability. Attributes way is good at size of the XML. <message> <id>1</id> <myword>Hello</myword> </message> <message id=”1″> <myword>Hello</myword> </message> <message id=”1″>Hello</message> <message id=”1″ myword=”Hello” /> Which way do you prefer?