How to avoid getting the "diffgr:before" when reading xml in asp classic

Posted on 2009-04-17
Last Modified: 2012-06-27
I have a web method that returns a Datatable.
The asp classic read it using MSXML2.DOMDocument, but the xml is retrieved using DiffGrams format (the original and current version)
Is it possible to indicate that I only want the current version?
This is part of the xml the asp receives:

<xs:schema id="NewDataSet">
<xs:element name="NewDataSet" msdata:IsDataSet="true" msdata:MainDataTable="SEARCH_RESULT" msdata:UseCurrentLocale="true">

Any help?

Question by:richardhaeger
    LVL 39

    Accepted Solution

    Yes, that is possible and the preferred method is XSLT. I'm not to sure how to setup XSLT for ASP classic, though it shouldn't be too hard to do. The XSLT you need to do this is as follows, which will create the correct XML output (without diffgr:before) if you feed it the XML that contains the diffgr:before.

    -- Abel --

    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0"
        <xsl:output method="xml" indent="yes"/>
        <xsl:template match="node()|@*">
                <xsl:apply-templates select="node()|@*" />
        <!-- a "delete"-template to remove all contents of diffgr:before -->
        <xsl:template match="diffgr:before" />

    Open in new window

    LVL 39

    Expert Comment

    btw, here's a simple example of how you can setup your ASP to run the XSLT. It's quite straightforward, really:

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    Better Security Awareness With Threat Intelligence

    See how one of the leading financial services organizations uses Recorded Future as part of a holistic threat intelligence program to promote security awareness and proactively and efficiently identify threats.

    Suggested Solutions

    I was asked about the differences between classic ASP and ASP.NET, so let me put them down here, for reference: Let's make the introductions... Classic ASP was launched by Microsoft in 1998 and dynamically generate web pages upon user interact…
    In order to have all security and back ups taken care of, WordPress users can sign up for services with WP Engine.
    The purpose of this video is to demonstrate how to set up the WordPress backend so that each page automatically generates a Mailchimp signup form in the sidebar. This will be demonstrated using a Windows 8 PC. Tools Used are Photoshop, Awesome…
    This video is a brief demonstration on how to use security groups and Network Access Control Lists (ACLs) in Amazon Web Services.  Security groups and Network ACLs are mechanisms you can use in AWS to control network traffic.

    779 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

    15 Experts available now in Live!

    Get 1:1 Help Now