Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium


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

Posted on 2009-04-17
Medium Priority
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
  • 2
LVL 39

Accepted Solution

abel earned 500 total points
ID: 24174591
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

ID: 24174593
btw, here's a simple example of how you can setup your ASP to run the XSLT. It's quite straightforward, really: http://www.inov8design.com.au/articles/xml_xslt_asp.asp

Featured Post

Free Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
New Relic recently released its Synthetics product that allows for the creation of performance monitors that periodically test a site's performance. If you wish to test an interactive workflow New Relic employs Selenium WebDriverJS to run those test…
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…
When cloud platforms entered the scene, users and companies jumped on board to take advantage of the many benefits, like the ability to work and connect with company information from various locations. What many didn't foresee was the increased risk…
Suggested Courses

564 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