processing xml document from VB application.

Posted on 2009-12-16
Last Modified: 2012-05-08

Have a look at this xml:

<?xml version="1.0" encoding="UTF-8"?>
    xmlns:xsl="" version="1.0">
      <xsl:output indent="yes"/>
      <xsl:strip-space elements="*"/>
      <xsl:param name="service" select="''" />
      <xsl:param name="trans" select="''" />
      <xsl:output method="xml" omit-xml-declaration="yes"/>
      <xsl:template match="/">
                  <table name="STATUS" service="{$service}">
                  <xsl:apply-templates select=".//ota:OTA_HotelAvailRS/ota:RoomStays"/>


      <xsl:template match="ota:Errors">
                  AnteeoReason="There was an error retrieving availability."

      <xsl:template match="message">
            <xsl:apply-templates />

      <xsl:template match="alternatelistseg">
            <table name="HotelAvail" service="{$service}">
                  <xsl:apply-templates />
      <!--      <xsl:template match="/">
            <xsl:apply-templates select="ota:OTA_HotelAvailRS/ota:RoomStays"/>
      <xsl:template match="ota:RoomStays">
            <table name="HotelAvail" service="">
                  <xsl:apply-templates select="ota:RoomStay"/>
      <xsl:template match="ota:RoomStay">
            <xsl:element name="AvailHtl">
                  <xsl:apply-templates select="*"/>
      <xsl:template match="ota:TimeSpan">
            <xsl:attribute name="TimeStart">
                  <xsl:value-of select="@Start"/>
            <xsl:attribute name="TimeDuration">
                  <xsl:value-of select="@Duration"/>
      <xsl:template match="ota:Total">
            <xsl:attribute name="AmountAfterTax">
                  <xsl:value-of select="@AmountAfterTax"/>
            <!-- 09/12/2009 <xsl:attribute name="TimeDuration">
                  <xsl:value-of select="@Duration"/>
            </xsl:attribute>            -->
      <xsl:template match="ota:ResGuestRPHs">
            <xsl:for-each select="ota:ResGuestRPH">
                  <xsl:attribute name="ResGuestRPH-{position()}">
                        <xsl:value-of select="@RPH"/>
      <xsl:template match="ota:RoomRates">
            <xsl:for-each select="ota:RoomRate">
                  <xsl:attribute name="RoomRate-{position()}">
                        <xsl:value-of select="@RatePlanCode"/>
      <xsl:template match="ota:BasicPropertyInfo">
            <xsl:attribute name="ID">
                  <xsl:value-of select="@HotelCodeContext"/>
            <xsl:attribute name="VendorMessage">
                  <xsl:value-of select="ota:VendorMessages"/>
      <xsl:template match="ota:CancelPenalties">
            <xsl:for-each select="ota:CancelPenalty">
                  <xsl:attribute name="CancelPenalty-{position()}">
                        <xsl:value-of select="ota:Deadline/@OffsetUnitMultiplier"/>
      <xsl:template match="ota:RoomStay">
            <xsl:element name="AvailHtl">
                  <xsl:attribute name="MaxOccupancy"></xsl:attribute>
                  <xsl:attribute name="Minoccupancy"></xsl:attribute>
                  <xsl:apply-templates select="*"/>


I need to process this xml file from a VB application. First of all, I need to check the error status and if no error and continue to process the xml. Can some body show me how can I achieve this VB6 please.
Question by:ube100
    1 Comment
    LVL 42

    Accepted Solution

    this is xsl file, what do u mean by "process this xml"?
    what r u trying to achieve?

    Featured Post

    Top 6 Sources for Identifying Threat Actor TTPs

    Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

    Join & Write a Comment

    Suggested Solutions

    Title # Comments Views Activity
    VB6 Rich TextBox command works only in IDE 8 26
    Problem to the message 13 54
    DO Loop not working 4 52
    Help in WHSCRIPT 9 31
    The debugging module of the VB 6 IDE can be accessed by way of the Debug menu item. That menu item can normally be found in the IDE's main menu line as shown in this picture.   There is also a companion Debug Toolbar that looks like the followin…
    You can of course define an array to hold data that is of a particular type like an array of Strings to hold customer names or an array of Doubles to hold customer sales, but what do you do if you want to coordinate that data? This article describes…
    As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
    Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…

    733 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    24 Experts available now in Live!

    Get 1:1 Help Now