Archive

Posts Tagged ‘XML’

Parsing XML in Python: A Quick Working Sample

December 22nd, 2013 No comments

In my recent consulting projects, I used Python on various projects including the VMware pyVmomi () for managing vSphere. Because XML is ubiqutous these days, I had to use XML for configuration, passing information, etc. Parsing XML is a very basic part of using XML. The following sample code can achieve the same thing (print out may be different) as the C# sample that parses XML I wrote before.

Categories: Software Development Tags: , ,

Parsing XML in C#: A Quick Working Sample

August 9th, 2013 15 comments

Just started to work on hacking the Web application of vCAC and REST APIs in C#. As expected, the XML processing is an indispensable part for that purpose. I have worked on C# on and off in the past, but never as consistently as on Java. To get myself familiar with the related C# APIs for parsing, I coded the following sample code.

0bcf296840b613eac644f862449c5ae7002

Categories: Software Development Tags: , ,

Escaping Characters for SOAP XML: Late But Here

September 26th, 2011 No comments

It’s a known bug in VI Java API that it did not escape strings to be included within a XML tag. The potential risk, although very very rare, is that it can blow the de-serialization of a request on the server side. I did get one or two reports on failing on login, which turned out to be caused by special characters like < or > in passwords. As a quick fix, an escaping logic has been added to escape the special characters in passwords.

Categories: vSphere API Tags: , ,

Introducing A Tiny Yet Powerful API to Manage and Automate vSphere

February 3rd, 2010 8 comments

In yesterday’s blog, I talked about a little known secret of vSphere MOB – the invisible embedded XML in the HTML pages. To take advantage of the secret, I created a client side REST API which was shipped in VI Java API 2.0.