How to Publish to a WordPress Blog Using XmlRpc
This is the first in a series of posts about how to publish to a WordPress blog using an interface called XmlRpc that is supported by WordPress as well as other blogging platforms.
My motivation for writing these posts is that I have a hobby project that is written in the C# language, and I wanted to be able to automatically publish some of the content that I create to my blog. However, when I searched the Web high and low I didn’t find much help. Don’t get me wrong, there are some libraries that are commonly used, but I found them to be awkward, poorly documented, and/or non-intuitive to figure out.
My goal was to create some custom code that could publish to XmlRpc without depending on any external libraries (other than what is natively in the .NET Framework), that would be easy to use and figure out, and that would could be done in a few hundred lines of code. You can be the judge as to whether I was successful. But I have to tell you I was amazed at how easy it was to accomplish these goals, and it made me wonder why others have made it so difficult (with all due respect).
On the other hand, I don’t claim that what I publish here will be a polished end product. I have created the core functionality that I will use (and that I think is most likely to be used by others), but extending it further should be straightforward.
I will explain this in a series of posts but may not link directly to each and every post. To get to them, just click on the WordPress-XmlRpc category on this blog, and it will take you there.
Last thing: at least in the beginning, the code snippets posted here will be in the C# language. However, because I am not using custom libraries, it should be straightforward to translate it to other languages (Java, VB.Net, Python, etc.). I’ve even thought about doing this and posting snippets in other languages, but it depends on people’s interest level (leave me a comment).
Hi Toby,
Thanks for this – can you also provide the source code or the visual studio project files?
I made an application in C# that uses a available library for xmlrpc. I think your post can make this library irrelevant and increase the control one has over the functionality.
Thanks,
Alex
Hi Alex,
You should be able to get the source code from the various posts under the XmlRpc category. Are you able to get those? If you still need the VS project file, I will see if I can round them up.
-Steve
I also need those source files. Because, Sincerely, I am NOT able to put all the lines code piece by piece to create the working file.
I am working now for an application to post to some of my blogs by XMLRPC. The project is very hard for me because i am a beginner and i use an shared application. My application work well but is …a little ( to much) simplistic one.
Your application is a way better and complex.
Thank you.
OK, I’ve posted the project files at the following location. Please let me know if you’re not able to download them. http://code.hammerpig.com/files/2011/07/Piccolo.Common1.zip
Thank you.
I really appreciate.Download succeded
I will test your files to see the improvement over my little application.
Regards,
dan