Parsing XML Embedded in VBScript (QTP) - vbscript

Say there's a QTP Function Library that contains many procedures. Each procedure contains documentation written in an XML node format that describes the purpose, return values and other information about the procedure.
Is there a way to parse these XML documentation that is embedded in the source code just like how it is possible to generate documentation based on XML documentation in .NET?

Microsoft's own XML parser should do the job. I've used it in a couple of projects. The SO posting MSXML2.ServerXMLHTTP.4.0 Source? shows how to find out which version is installed on your machine. Microsoft, naturally, has a lot of documentation. You could probably start here.

Related

YAML to HTML Eclipse plugin

There are lot of Swagger related codegens to convert a YAML to HTML file , but is there an eclipse plugin available which can open or convert a YAML to HTML ?
I have searched in multiple places but there's no place where we can find such a plugin .Plugins like Yedit help seeing a YAML in colour syntax form but not as a HTML ?
You might want to take a look at RepreZen API Studio, available as a standalone desktop application or as an Eclipse plugin.
It includes swagger-codegen and other open source generators, which can create various forms of HTML documentation from your YAML-formatted Swagger-OpenAPI spec. Code generation is fully integrated into the IDE, but can also be run from the command line or CI/CD automated builds.
To clarify, there's no HTML "equivalent" of a Swagger-OpenAPI spec, or any other form of YAML. So it's not a simple matter of converting one file format to another. But there are various components that render a machine-readable OpenAPI spec, in YAML or JSON form, in a user-friendly HTML documentation format, often with integrated sandbox testing.
One of these is Swagger-UI, and it's included in the HTML formats that are supported by RepreZen API Studio. I hope that helps.

Itextsharp documentation for xml

I am looking for documentation on the XML parser in ItextSharp, I heard there was a dtd years ago but this seems to be defunt. Does anyone know where I can find out all the valid tags and references?
I am using ItextSharp with Spark
Thanks
When in doubt, use the source. Poking around in my copy of the current iText source, I see that the only SimpleXMLDocHandler available is HTMLWorker.
And if you look at the source for HtmlTags.cs, you'll see all the tag and attribute constants HTMLWorker uses.
It's not exactly comprehensive, but is going to be getting some Enhancement in the immediate future.
I don't see a 4.1.2 tag, but there's one for 4.1.6 in the iTextSharp project on SF. It shows ITextHandler using a bunch of constants from ElementTag in HandleStartingTags(). It also uses ElementFactory to build the various supported tags. Looking at the source for each function will tell you which attributes it supports.

Good metadata image dump utilities?

I'm looking for the best tool out there to extract any and all metadata embedded within the most popular image file formats (JPEG and PNG specifically). I would like to know about whatever is in there (XMP, Exif, IPTC/IIM, etc.). Ideally I am looking for an all-in-one solution that I can run from a command line, but am interested to hear about any other tools in this area that are of value.
I have found the following, each with advantages/disadvantages:
ExifTool is good, but the output is a little more roughshod that I would like.
DumpImage from the Metadata Working Group has good formatting of the metadata it does find, but doesn't support PNG.
I have recently released Binspector, the tool I ended up writing to answer this question to my own satisfaction. The basic premise of the tool is that it takes a format grammar and uses it to analyze a binary file. As long as the format grammar and the binary file are well-formed, one can inspect and analyze innumerable binary files and formats.
Code is hosted on GitHub, and a blog for the tool is here. (The overview post for the tool is here.)
As you did not mention any preferred programming language I take PHP as an example.
There is an Exif Extension for PHP which can be used to easily retrieve Metadata from an Image.
http://www.php.net/manual/en/function.exif-read-data.php
You could easily create a script that you can call from the command line. I must add that the extension only seems to provide support for JPEG and TIFF images.
You could try the official ADOBE XMP SDK. It is available for download at :
http://www.adobe.com/devnet/xmp.html
This is the complete SDK to read/write/manipulate metadata across a variety of formats.
In the SDK package there is one particular sample that might be of interest to you. Go to the "samples" folder build the samples as per documentation (available in the package). Look for the sample exe "DumpFile". This dumps all the metadata in the file to the console.

Code Documentation for ASP.NET + VB.NET application

We have a very old application dating back to ASP era which we are gradually refactoring to ASP.NET + VB.NET codebase.
It contains a lots of files with the below types:
aspx, asmx, ascx, vb, js (JavaScript), html, vbs (VBScript).
The backend database is SQL Server 2005 with lots of sprocs.
We would like to create a code documentation automatically generated from the comments in the code files. I liked Doxygen very much but seems like it does not support the above technologies. Can you please suggest some document generator tools, preferably a single tool or a group of tools?
Thanks a lot.
Ajit.
You can take a look at Microsoft's Sandcastle tool. I've used it many times, and it generates documentation based on the comments provided in your .NET code. If I remember correctly, it can also generate documentation for JavaScript libraries.
There are some out there:
SandCastle
NDOC
i've used SandCastle and it works too good if you have xml comments in your code.
You first enable xml documentation in your project by setting it in Project Properties -> Compile -> Generate XML Documentation.
Once done you may have to set treat warnings as errors, so that the studio can point out to you where and all the XML comments are missing.
To add an XML Comment, you place your cursor before a class definition or a function definition and type
///
This will automatically generate xml tags for documentation and then once you are done, you can import the project and start to build the documentation.
The good part is, if you have documented your classes well, when you use those functions in your application upon mouse over you can find the description which you wrote, much like how intellisense documentation works.
Let me know if you run into any other issues.
My last suggestion, make a hello world project and xml document it and get used to sandcastle with it.

Is it possible to wikify Visual Studio XML comments?

Is it possible to generate a set of wiki pages from XML comment file generated by Visual Studio?
I'm talking about something like Sandcastle, but for wiki format instead of compiled CHM.
Edit: I'm using MediaWiki which can import/export articles in XML. So I hope that it is possible to write a transformation converting XML comments to MediaWiki XML.
I'd recommend a bit different solution:
Use Help Server to publish .CHM/.HxS on the web
Use special MediaWiki templates to link reference from Wiki like here.
Use <see href="..."> to link Wiki pages from XML comments
See also: FiXml
This is not exactly what you wanted, but I hope this will be helpful.
If the items mentioned above do not suffice, have you tried to simply build your own XSLT transform into the wiki markup of your choice?
You can write a simple application in .NET (or pick your platform of choice) to transform the doc XML format to wiki XML format. You'd still have to keep the wiki updated with the output files manually.

Resources