Question An attempt was made to insert a node where it is not permitted

knee_boarder

Member
Joined
Oct 5, 2009
Messages
5
Location
United Kingdom
Programming Experience
5-10
I'm getting the above error from an xslt file that pulls out the variable passed in the xml from my .net web service. I'm struggling with xslt so I've probably made a really basic mistake so any help would gratefully be received.

xml passed from web service:

VB.NET:
<?xml version="1.0" encoding="utf-8"?><soap:Envelope xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"><soap:Body><CreateBulkyWasteCollectionResponse xmlns="http://tempuri.org/"><CreateBulkyWasteCollectionResult>WK/200910565</CreateBulkyWasteCollectionResult></CreateBulkyWasteCollectionResponse></soap:Body></soap:Envelope>

xslt:

VB.NET:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet 
	xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 
	xmlns:enc="http://schemas.xmlsoap.org/soap/encoding/" 
	xmlns:awiw="http://tempuri.org/CreateBulkyWasteCollection" 	
	xmlns:xs="http://www.w3.org/2001/XMLSchema"		
	xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/" 
	xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 
	xmlns:xsd="http://www.w3.org/2001/XMLSchema"
	version="1.0">
	<xsl:output method="xml" indent="yes"/>
	<xsl:template match="/soap:Envelope/soap:Body/CreateBulkyWasteCollectionResponse">
		<EformResult>
			<Result field="M3Ref">
				<Value>
					<xsl:value-of select="substring-before(substring-after(CreateBulkyWasteCollectionResponse, '<CreateBulkyWasteCollectionResult>'), '</CreateBulkyWasteCollectionResult>')"/>
				</Value>
			</Result>
		</EformResult>
	</xsl:template>
</xsl:stylesheet>

Thanks for your time.

Steve Wilkinson
 
Back
Top