What is .NET XmlSerializer?
2006 Jan 13
101 of 174 | XmlSerializer Quiz: The solution -
I posted a little question here,
just asking "Why?". For your reading convenience, I pull the code in here once more:
DateTime issued;
[XmlIgnore]
public DateTime
IssuedUtc
{ get { return issued;
} set { issued = value;
} }
[XmlElement("issued")]
public DateTime IssuedLocalTime
{ get { return Issued.ToLocalTime();
} set { Issued = value.ToUniversalTime();
} }
So, indeed, why am I doing this? Well, when I decided to normalize all times
handled by the backend engine of dasBlog into the UTC timezone, I really didn't
think of the XML Serializer being a problem at first. It turned out......
2006 Jan 06
102 of 174 | Prettification of XML Serialization within Web Services - Prettification of XML Serialization within Web Services
This came up yesterday on an internal mailing list.
A colleague remarked that, following best practices in modular schema design results in bloat of serialized messages, particularly with namespace attributes. This issue manifests itself when using .NET Web Services, either client or server, either .NET 1.x or 2.0.
Was this person right Yes and No. This bloat can happen, but it can be avoided pretty simply in .NET if you know the knob to twist. Before I show you the knob I want to explain the problem a bit more.
The Schema and the Code
Consider the case where there is a common schema that is used across enterprise. As a simple exa......
2005 Dec 16
103 of 174 | How to: Specify an Alternate Element Name for an XML Stream - Using the XmlSerializer, you can generate more than one XML stream with the same set of classes. You might want to do this because two different XML Web services require the same basic information, with only slight differences. For example, imagine two XML Web services that process orders for books, and thus both require ISBN numbers. One service uses the tag while the second uses the tag . You have a class named Book that contains a field named ISBN. When an instance of the Book class is serialized, it will, by default, use the member name (ISBN) as the tag element name. For the first XML Web service, this is as expected. But to send the XML stream to the second XML Web service, you must ......
2005 Dec 12
104 of 174 | Processing XML in .NET: Antipatterns -
I run into this article "Harnessing the BackPack API" by Michael K. Campbell in the new and very cool "XML 4 Fun" column at MSDN. The article is otherwise brilliant and really fun, but XML processing code samples are not so good. It`s actually a great collection of XML processing antipatterns. Let`s see.
Here is a code snippet:
private void SinglePageReturned(string pageData)
{
// TODO: add try/catch etc
byte[] data = Encoding.UTF8.GetBytes(pageData);
MemoryStream stream = new MemoryStream(data);
XPathDocument input = new XPathDocument(stream);
XslCompiledTransform xsl = new XslCompiledTransform();
XmlNode stylesheet = this.LoadTransformDocument()......
2005 Dec 10
105 of 174 | You Can`t Click A Bus! - Push Button ParadiseBut thats not the point now is it.What I`d like to know is: does it give common questions a well-known, RESTy URL Or are the URL`s full of extra stuff, not really useful from a REST standpoint, merely adding overhead to folks that proverbially want to put the URL on the side of a busThis is a fantastic argument that Micah has brought to the surface. When we spend so much proselytizing the importance of XML being human readable -- using this argument as one of the many reasons why binary XML is a bad idea -- why then do some of us still force upon our site visitors URI`s that make absolutely no logical sense to anybody BUT the developers who wrote the server-side process......
106 of 174 | You Can`t Click A Bus! - Push Button ParadiseBut thats not the point now is it.What I`d like to know is: does it give common questions a well-known, RESTy URL Or are the URL`s full of extra stuff, not really useful from a REST standpoint, merely adding overhead to folks that proverbially want to put the URL on the side of a busThis is a fantastic argument that Micah has brought to the surface. When we spend so much proselytizing the importance of XML being human readable -- using this argument as one of the many reasons why binary XML is a bad idea -- why then do some of us still force upon our site visitors URI`s that make absolutely no logical sense to anybody BUT the developers who wrote the server-side process......
2005 Dec 04
107 of 174 | The One About Attributes - I love using .NET attributes.
When I am teaching a class on web services, I start by showing what an attribute is, how you can create custom attributes, and how to use GetCustomAttributes to detect your attribute. I then cruft up a sample CsvSerializer that serializes a class to a CSV file based on the metadata attributes. This helps show what the XmlSerializer is accomplishing behind the scenes, and selfishly gives me an opportunity to code using a part of the framework that I find fascinating.
I have been digging into ASMX lately a little more than I had previously, part of which requires that I spend more time looking at the System.Xml.Serialization attributes that affect XML seria......
2005 Nov 22
108 of 174 | W3C Launches EXI Working Group to Validate Binary XML - W3C announces working group to oversee integration between Binary XML and other XML implementations....
2005 Nov 17
109 of 174 | Issues when working with Ajax - Mercury Tide has written a mini-paper on Issues when working with Ajax.They cover basic items to do with working with XMLHttpRequest, focusing on cross-browser issues.Getting the XMLHttpRequest ObjectThey start with how to get the object itself:function getNewXMLHttpRequest() { var obj; try { // For Internet Explorer. obj = new ActiveXObject(`Microsoft.XMLHTTP`); } catch(e) { try { // Gecko-based browsers, Safari, and Opera. obj = new XMLHttpRequest(); } catch (e) { // Browser supports Javascript but not XMLHttpRequest. obj = false; } } return obj;}I actually prefer the clean way that Prototype does this:var Ajax = { ......
110 of 174 | Issues when working with Ajax - Mercury Tide has written a mini-paper on Issues when working with Ajax.They cover basic items to do with working with XMLHttpRequest, focusing on cross-browser issues.Getting the XMLHttpRequest ObjectThey start with how to get the object itself:function getNewXMLHttpRequest() { var obj; try { // For Internet Explorer. obj = new ActiveXObject(`Microsoft.XMLHTTP`); } catch(e) { try { // Gecko-based browsers, Safari, and Opera. obj = new XMLHttpRequest(); } catch (e) { // Browser supports Javascript but not XMLHttpRequest. obj = false; } } return obj;}I actually prefer the clean way that Prototype does this:var Ajax = { ......
2005 Oct 18
111 of 174 | The Myth of the Office XML Binary Key - A recent comment on the Groklaw blog entitled Which
Binary Key? claims that one needs a "binary key" to consume XML produced by Microsoft
Office 2003. Specifically the post claims
No_Axe speaks as if MS Office 12 had already been released and everyone
was using it. He assumes everyone knows the binary key is gone. Yet Microsoft is saying
that MS Office 12 is more or less a year away from release. So who really knows when
and if the binary key has been dropped? All i know is that MSXML 12 is not available
today. And that MSXML 2003 has a binary key in the header of every file.
...
So let me close with this last comment on the fabled “binary key”. In March of 2005,
when phase ......
112 of 174 | The Myth of the Office XML Binary Key - A recent comment on the Groklaw blog entitled Which
Binary Key claims that one needs a "binary key" to consume XML produced by Microsoft
Office 2003. Specifically the post claims
No_Axe speaks as if MS Office 12 had already been released and everyone
was using it. He assumes everyone knows the binary key is gone. Yet Microsoft is saying
that MS Office 12 is more or less a year away from release. So who really knows when
and if the binary key has been dropped All i know is that MSXML 12 is not available
today. And that MSXML 2003 has a binary key in the header of every file.
...
So let me close with this last comment on the fabled binary key. In March of 2005,
when phase II of the ODF TC......
2005 Sep 09
113 of 174 | Safari 2.0.1: No longer an Ajaxian pain - Mention Safari to many JavaScripters, and they sigh. Look at many frameworks, libraries, and components, and you don`t see Safari on the list of supported browsers half the time.Alex Russell sees some hope with Safari 2.0.1 and maybe beyondAfter much discussion recently with Erik, we decided that Safari was a lost cause when it came to coercing XML documents out of serialized strings. Fortunately, Safari 2.0.1 seems to now include both the DOMParser and XMLSerializer classes that Mozilla implements. Looks like some of the last chinks in Safari`s Ajax armor are finally fixed....
2005 Sep 08
114 of 174 | XML 2005 Conference - deadlines are fast approaching - Microsoft is helping to sponsor the XML 2005 Conference (November 14-18, Atlanta GA) and we encourage people to participate. There is still time to submit proposals for "late breaking news" presentations, presentations to describe and promote specific products, and "town hall meetings" where people can get together to informally debate the issues of the day. See the call for participation for details, but be aware that the deadline is September 16. We encourage anyone, especially those who are building XML solutions on a Microsoft platform, to submit a proposal let the world know about them at XML 2005.
Town Hall Meetings have been revamped this year to provide a venue for anyone with s......
2005 Sep 06
115 of 174 | Simple string/byte[] encryption and decryption using AES in C# - Paste these methods in your Utils class or other and use them as is to encrypt and decrypt your /// Use AES to encrypt data string. The output string is the encrypted bytes as a base64 string. /// The same password must be used to decrypt the string. /// /// Clear string to encrypt. /// Password used to encrypt the string. /// Encrypted result as Base64 string. public static string EncryptData(string data, string password) { if ( data == null ) throw new ArgumentNullException("data"); if ( password == null ) throw new ArgumentNullException("password"); return Convert.ToBas......
2005 Sep 02
116 of 174 | XSD Custom Build Provider causes strong bodily reaction -
Strong bodily reactions are a great way to measure the impact of new technologies.
While many US technical conference crowds like clapping when they see new features
demoed, I think the best reaction is a more modest bodily reaction. I'll never forget
the time I shivered after seeing Eric Gamma demonstrate the Refactoring support in
Eclipse a couple of years ago. One area of .NET 2.0 that is generating strong
bodily feedback is ASP.NET 2.0's support for Custom Build Providers.
First there was Fritz
dropping his jaw when he created a custom build provider that took his custom
XML metadata file which he dropped into the app_code directory that automati......
117 of 174 | XSD Custom Build Provider causes strong bodily reaction -
Strong bodily reactions are a great way to measure the impact of new technologies.
While many US technical conference crowds like clapping when they see new features
demoed, I think the best reaction is a more modest bodily reaction. I`ll never forget
the time I shivered after seeing Eric Gamma demonstrate the Refactoring support in
Eclipse a couple of years ago. One area of .NET 2.0 that is generating strong
bodily feedback is ASP.NET 2.0`s support for Custom Build Providers.
First there was Fritz
dropping his jaw when he created a custom build provider that took his custom
XML metadata file which he dropped into the app_code directory that automatically
......
2005 Jul 12
118 of 174 | More on Java and MSMQ -
In my original post on Java interop with MSMQ, I gave a sample implementation of a Queue class for Java that was able to send and receive strings, and I suggested that it would be pretty simple to extend it to send whatever you want. A couple of people have asked just what would be required, so here are some additional details.
For example, suppose you want to extend the Queue class to be able to send and receive a byte array. Here`s what you`d do:
First, Read The Fine Manual from Sun on sending arrays through JNI. Then, using that new-found knowledge, add a couple of new native methods (one for send, one for receive) in the MsmqQueueNativeMethods.cpp file, that handle a jbyteArray a......
2005 Jun 25
119 of 174 | InfoPath and the File Upload Control - InfoPath provides a variety of controls that can be used during form design. One of these controls is the file upload. It enables the direct inclusion of documents within an InfoPath form. Also, it provides the ability to directly browse the local file system to browse and retrieve files from the local file system. It is important to understand how this control works and its effect on your form design. The direct inclusion of these files within the XML document means they are converted to a string using base64. This has some interesting effects on a form if you arent aware of how the control works. In this video, I take a brief look at this control and how it can be used.
...
2005 Jun 09
120 of 174 | How to get binary XML out of SQL Server 2005 XML field - Very interesting exploration from friend Andres Aguiar....
2005 May 28
121 of 174 | High-performance XML (V): Increase performance on message-based web services by avoiding XmlDocument creation when using XmlSerializer - In a previous post, I discussed the way coarse-grained web service interfaces can be used in a strongly typed way by resorting to the xsd.exe or a cool custom tool. The only problem with that approach is that in order to communicate with the service, you need to pass an XmlNode, when you actually have an instance of an object. People will usually write code like the following to call the service: // Customer is an XmlSerializer-friendly classCustomer cust = new Customer("Daniel", "Cazzulino", new DateTime(1974, 4, 9)); // "Convert" the object to an XmlNodeXmlSerializer ser = new XmlSerializer(typeof(Customer));XmlNode customerNode; using (MemoryStream mem = new MemoryStream()){ ser.Seria......
2005 Apr 18
122 of 174 | How to use base64 encoding in SQL Server 2005 - Kirk Allen Evans gives an example how to generate a base64 encoded WordML binData element. Just for kicks, here is how the same code would look like in SQL Server 2005 using FOR XML (as in his case, it is not the complete Word document):
WITH XMLNAMESPACES (`http://schemas.microsoft.com/office/word/2003/wordml` as w)SELECT img as "w:binData"FROM OpenRowset(BULK `c:\temp\test.gif`, SINGLE_BLOB) T(img)FOR XML PATH(`w:wordDocument`), TYPE
Oh the joy of declarative programming :-). Here is how you can extract the value (assuming the XML with the base64 encoded value was in a T-SQL variable @x):
SELECT @x.value(`declare namespace w="http://schemas.microsoft.com/office/word/2003/wordml";(/w:wordD......
2005 Apr 12
123 of 174 | Versioning messages in WebServices using XmlSerializer (was One parameter to rule them all) - Some time ago, there was an exchange of opinions between Don Smith and Dare Obasanjo about the merits of having coarse-grained web service interfaces (e.g. XmlNode Execute(XmlNode message)). Many believe this is an approach that eases long-term versioning of your service. The reason is that you can simply have a version number on the message itself and follow one of the following approaches when messages arrive (and you already support multiple message versions): Apply a transformation on the fly based on the message version: this can be done to upgrade an incoming version to the one that is supported by a single internal implementation, and/or to downgrade the response so that an older cl......
2005 Apr 03
124 of 174 | Avoid Using PSVI in Web Service Contracts - When you create web services, you should use contract-first design. However, this comes with a caveat: don`t assume that PSVI data will be present in the message. Design your messages based on schema, absolutely, just don`t rely on PSVI elements in web services unless you are guaranteed validation.
Introduction to the PSVI
The PSVI contains the XML Infoset representation after an XML document has been validated. The easiest way to understand this concept is to see it in action. XML Schema 1.0 provides the means to define attributes using the xs:attribute element. The production for xs:attribute:
fixed = string form = (qualified | unqualified) id = ID name = NCName ref = QName type = QN......
125 of 174 | base64 Encode XML Data - In a comment on my post on base64 decoding a picture in XML, someone asked (before the comment was deleted during the upgrade to Community Server until I learned where to find the comments in Community Server) how to do the opposite of that post. That is, how do you base64 encode binary data into an XML document
The key to doing this lies in the XmlTextWriter.WriteBase64() method. This method accepts a byte array, so the only question left is how to convert a picture to a byte array
In the example below, I load a GIF image from file into a System.Drawing.Image object. To convert this to a byte array, I save the picture to an in-memory stream, which in turn can be read into a byte array u......
2005 Feb 26
126 of 174 | PocketXMLRPC v1.2.1 released - PocketXMLRPC v1.2.1 released, updated to latest PocketHTTP, vastly increase base64 decoding performance....
2005 Feb 23
127 of 174 | Online Video - Using the XmlDocument Class - I spent a few hours yesterday putting together the first segment in a new online video series that will demonstrate how to use different XML parsing APIs built-into the .NET framework including the XmlDocument, XmlTextReader/XmlTextWriter, XPathNavigator and XmlSerializer classes. The first one titled "Using the XmlDocument Class" can be found here: http://www.xmlforasp.net/CodeSection.aspx?csID=113 This video segment demonstrates some XmlDocument class fundamentals including how the Document Object Model (DOM) works, parsing RSS feeds, filtering with XPath, and editing XML....
2005 Feb 22
128 of 174 | Online Video - Using the XmlDocument Class - I spent a few hours yesterday putting together the first segment in a new online video series that will demonstrate how to use different XML parsing APIs built-into the .NET framework including the XmlDocument, XmlTextReader/XmlTextWriter, XPathNavigator and XmlSerializer classes. The first one titled "Using the XmlDocument Class" can be found here: http://www.xmlforasp.net/CodeSection.aspxcsID=113 This video segment demonstrates some XmlDocument class fundamentals including how the Document Object Model (DOM) works, parsing RSS feeds, filtering with XPath, and editing XML....
2005 Feb 11
129 of 174 | The Fallacy of "XML Will Save Us" -
Steve Vinoski has a blog posting entitled Focus
on the contract where he writes
Tim offers some extremely
excellent advice (as usual) regarding what really matters when you write your
services. If I may paraphrase what he says and perhaps embellish it a bit, starting
from the implementation language and generating your contracts from it is just plain
wrong, wrong, wrong, at least for systems of any appreciable magnitude, reach, or
longevity. Instead, focusing on the contracts first is the way to go. I've written
about this for many years now, starting well over a decade ago.
When you start with the code rather than the contract, you are almost certainly going
to......
130 of 174 | The Fallacy of "XML Will Save Us" -
Steve Vinoski has a blog posting entitled Focus
on the contract where he writes
Tim offers some extremely
excellent advice (as usual) regarding what really matters when you write your
services. If I may paraphrase what he says and perhaps embellish it a bit, starting
from the implementation language and generating your contracts from it is just plain
wrong, wrong, wrong, at least for systems of any appreciable magnitude, reach, or
longevity. Instead, focusing on the contracts first is the way to go. I've written
about this for many years now, starting well over a decade ago.
When you start with the code rather than the contract, you are almost certainly going
to......
2005 Feb 10
131 of 174 | The Fallacy of "XML Will Save Us" - Steve Vinoski has a blog posting entitled Focus on the contract where he writes Tim offers some extremely excellent advice (as usual) regarding what really matters when you write your services. If I may paraphrase what he says and perhaps embellish it a bit, starting from the implementation language and generating your contracts from it is just plain wrong, wrong, wrong, at least for systems of any appreciable magnitude, reach, or longevity. Instead, focusing on the contracts first is the way to go. I`ve written about this for many years now, starting well over a decade ago. When you start with the code rather than the contract, you are almost certainly going to slip up and allow style or......
2005 Feb 09
132 of 174 | On the Complexity of XML APIs - David Megginson (the creator of SAX) has a post entitled The complexity of XML parsing APIs where he writes Dare Obasanjo recently posted a message to the xml-dev mailing list as part of the ancient and venerable binary XML permathread (just a bit down the list from attributes vs. elements, DOM vs. SAX, and why use CDATA). His message including the following: I dont understand this obsession with SAX and DOM. As APIs go they both suck[0,1]. Why would anyone come up with a simplified binary format then decide to cruft it up by layering a crufty XML API on it is beyond me. [0] http://www.megginson.com/blogs/quoderat/archives/2005/01/31/sax-the-bad-the-good-and-the-controversial/ [1] http://......
133 of 174 | On the Complexity of XML APIs -
David Megginson (the creator of SAX) has
a post entitled The
complexity of XML parsing APIs where he writes
Dare Obasanjo recently
posted a message to
the xml-dev mailing
list as part of the ancient and venerable binary XML permathread (just
a bit down the list from attributes vs. elements, DOM vs. SAX,
and why use CDATA?). His message including the following:
I don’t understand this obsession with SAX and DOM. As APIs go they both
suck[0,1]. Why would anyone come up with a simplified binary format then decide to
cruft it up by layering a crufty XML API on it is beyond me.
[0] http://www.megginson.com/blogs/quoderat/archives/2005/01/31/sax-the-bad-......
134 of 174 | On the Complexity of XML APIs -
David Megginson (the creator of SAX) has
a post entitled The
complexity of XML parsing APIs where he writes
Dare Obasanjo recently
posted a message to
the xml-dev mailing
list as part of the ancient and venerable binary XML permathread (just
a bit down the list from attributes vs. elements, DOM vs. SAX,
and why use CDATA?). His message including the following:
I don’t understand this obsession with SAX and DOM. As APIs go they both
suck[0,1]. Why would anyone come up with a simplified binary format then decide to
cruft it up by layering a crufty XML API on it is beyond me.
[0] http://www.megginson.com/blogs/quoderat/archives/2005/01/31/sax-the-bad-......
2005 Jan 15
135 of 174 | Follow up: Workaround for XmlSerializer assembly leaks -
A while ago, Paul Wilson and Kirk Allen Evans reported that the XmlSerializer is leaking assemblies when the serializer object was instantiated with any of the constructors but the most basic one. The simple XmlSerializer constructor has logic to re-use the temporary assemblies if it already built them for a given type. The more complex constructors are missing that caching logic and allow the temporary assemblies to leak if you don't keep the serializer instance around in your program.
When I was looking through the Product Feedback Center for Visual Studio 2005 (Whidbey)
the other day, I found out that the XmlSerializer assembly leak is not going to be fixed in Whidbey. Within a few......
2005 Jan 14
136 of 174 | Follow up: Workaround for XmlSerializer assembly leaks - A while ago, Paul Wilsonand Kirk Allen Evansreported that the XmlSerializer is leaking assemblies when the serializer object was instantiated with any of the constructors but the most basic one. The simple XmlSerializer constructor has logic to re-use the temporary assemblies if it already built them for a given type. The more complex constructors are missing that caching logic and allow the temporary assemblies to leak if you don`t keep the serializer instance around in your program.When I was looking through the Product Feedback Center for Visual Studio 2005 (Whidbey) the other day, I found out that the XmlSerializer assembly leak is not going to be fixed in Whidbey. Within a few days of ......
137 of 174 | New FI project implementing Fast Infoset standard for binary XML - The FI project is a new addition to the JWSDP community that implements the Fast Infoset Binary XML standard. This project is under an Open Source License (ASL 2.0). This project will deliver a production quality implementation to be used in JAX-RPC and other implementations. Some more details in my blog and in the home page for the project. ...
2005 Jan 13
138 of 174 | 1 + 1 + 1 + 1, together these makes 4 -Now please give me to play with one so I can learn some more... :) - Computerworld | DataPower updates firmware for acceleration engine[INSERT: That last title SUCKED! If you happend to see it... sorry! :D]"We built this whole new engine that relies on compilation technology to accelerate schema validation," says Eugene Kuznetsov, chief technology officer for DataPower. Last year, the company patented the compilation technology, which turns XML processing instructions into a form that can be read by the acceleration hardware.+1DataPower also added XML parsing support for transforming XML messages into Java objects and into Binary XML, an emerging and controversial XML format supported by DataPower.+1The company added partial support for XPath 2.0 and XSLT 2......
2005 Jan 08
139 of 174 | Interesting reading for fans of the XmlSerializer -
Ever wanted to know what schema constructs the XmlSerializer supports
http://whidbey.msdn.microsoft.com/library/default.aspurl=/library/en-us/dv_fxgenref/html/07ff107a-2a2e-4bf4-819f-6a591ee54479.asp
...
2005 Jan 06
140 of 174 | The FI Project - An Open Source Implementation of a Binary XML Standard - Sun has released under Open Source its implementation of Fast Infoset, an in-progress standard for Binary XML. Fast Infoset is simple to use and to integrate; you can think of it as GZIP for XML. This implementation is intended to be a high quality implementation to be used in production artifacts and we hope it will encourage wide adoption of the standard....
2004 Dec 31
141 of 174 | XML in the Crystal Ball: Binary XML and Grid Computing - Binary XML has been one of those concepts that`s been bandied aboutfor the last couple of years, though not without a huge amount ofaction. The principle here is simple - with XML as it exists now, textbased content can readily be parsed on any platform into an internalbinary representation (a DOM), but both the operations of parsing thefile and the subsequent reserialization of the content to externalentities are expensive operations. Time critical and high volumetransactions, such as those within financial applications, areespecially sensitive to this problem, and this may in fact account forthe less than enthusiastic adoption of web services within this sector....
2004 Dec 28
142 of 174 | XML`s overhead will open wallets - There`s a new article on the overhead that XML creates on networks, and what can be done about it:"Eyes, wallets wide open to XML traffic woes in 2005" This is a topic near and dear to my heart: I`ve been involved in long-running threads on the xml-dev mailing list on this, and gave a paper / presentation on this at the XML 2004 conference. Let`s look at the points raised in the serarchwebservices article in some detail: I think it addresses a real challenge that people are having with XML, but it paints a somewhat misleading picture of the alternative solutions. First, the article begins: "Enterprise affection for XML Web services may have C-level hearts fluttering over the immediate ......
143 of 174 | XML`s overhead will open wallets - There`s a new article on the overhead that XML creates on networks, and what can be done about it:"Eyes, wallets wide open to XML traffic woes in 2005" This is a topic near and dear to my heart: I`ve been involved in long-running threads on the xml-dev mailing list on this, and gave a paper / presentation on this at the XML 2004 conference. Let`s look at the points raised in the serarchwebservices article in some detail: I think it addresses a real challenge that people are having with XML, but it paints a somewhat misleading picture of the alternative solutions. First, the article begins: "Enterprise affection for XML Web services may have C-level hearts fluttering over the immediate......
144 of 174 | XML`s overhead will open wallets - There`s a new article on the overhead that XML creates on networks, and what can be done about it:"Eyes, wallets wide open to XML traffic woes in 2005" This is a topic near and dear to my heart: I`ve been involved in long-running threads on the xml-dev mailing list on this, and gave a paper / presentation on this at the XML 2004 conference. Let`s look at the points raised in the serarchwebservices article in some detail: I think it addresses a real challenge that people are having with XML, but it paints a somewhat misleading picture of the alternative solutions. First, the article begins: "Enterprise affection for XML Web services may have C-level hearts fluttering over the immediate ......
2004 Dec 22
145 of 174 | The Value of RSS -
It seems there`s been some recent hubbub in the world of podcasting about how to attach
multiple binary files to a single post in an RSS feed In a post entitled Multiple-enclosures
on RSS items Dave Winer weighs in on the issue. He writes
This question comes up from time to time, and I`ve resisted answering it directly,
thinking that anyone who really read the spec would come to the conclusion that RSS
allows zero or one enclosures per item, and no more. The same is true for all other sub-elements of
item, except category,
where multiple elements are explicitly allowed. The spec refers to "the enclosure"
in the singular. Regardless, some people persist in th......
2004 Dec 20
146 of 174 | Eyes, wallets wide open to XML traffic woes in 2005 - Enterprises are expected in 2005 to spend more on XML acceleration appliances to offload performance hits until a single binary XML format is ratified.Enterprise affection for XML Web services may have C-level hearts fluttering over the immediate efficiency and productivity gains, but the other shoe is about to drop in this relationship....
2004 Dec 15
147 of 174 | XmlSerializer and TimeSpan -
Just had to figure this out and
thought I’d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type duration,
but it doesn’t – for whatever reason. Anyways … here’s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That’s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn’t enough for you, you’d have to write an alternate implementation
for the......
148 of 174 | XmlSerializer and TimeSpan -
Just had to figure this out and
thought I’d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type duration,
but it doesn’t – for whatever reason. Anyways … here’s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That’s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn’t enough for you, you’d have to write an alternate implementation
for t......
149 of 174 | XmlSerializer and TimeSpan -
Just had to figure this out and
thought I’d share. With the XmlSerializer (.NET v1.1), one would think that
TimeSpan maps to the XML Schema type duration,
but it doesn’t – for whatever reason. Anyways … here’s a trick
to make it work. Interestingly enough, the XmlConvert class understands TimeSpan.
However it does not work correctly with fractional seconds and ignores them. That’s
enough for my purposes in the given app and therefore I am ignoring that issue in
the snippet below and treat all times of less than one second as equivalent to zero.
If it isn’t enough for you, you’d have to write an alternate implementation
for t......
2004 Dec 07