[BNM] XML Struggle
Barry Bloye
bbloye at gmail.com
Wed Mar 22 14:56:35 GMT 2006
On 21/03/06, Wayne Douglas wrote:
> <p597:RetrieveDemographicsResponse xmlns:p597="http://blah.test.com">
>
> That p597 bit is thrown in there by web sphere, I don't want it. Ever,
> at all.
>
> Any one know of the best way to strip it out? Preferably using C# .NET
> or XSLT or something that can be automated in an MS env.
In an XSLT stylesheet, you can remove unwanted namespace prefixes from
output elements by adding exclude-result-prefixes="..." to the
<xsl:stylesheet> element (or other tree/branch); e.g.
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
exclude-result-prefixes="p597">
However, since the namespace prefix keeps changing, that's where it
might get complicated. I suspect it won't accept a wildcard, so you
might have to find some way of grabbing the namespace prefix.
Hope that helps a bit, and isn't half a lesson in egg-sucking,
Baz
More information about the BNMList mailing list
BNMList is hosted by Screenlists, a Screen-Play.net service