The following test code illustrates the issue
[Fact]
public void ValidateTransform()
{
var templateTargetEnvelope = EnvelopeFactory.Create<Envelope>();
var templateTargetEnvelopeStream = new StringStream(templateTargetEnvelope.OuterXml);
var batchContentWithParts = MessageBodyFactory.Create<Batch.Content>(MessageBody.Samples.LoadString("Message.BatchContent.xml"));
var batchContentWithPartsStream = new StringStream(batchContentWithParts.OuterXml);
Given(
input => input
.Message(templateTargetEnvelopeStream)
.Message(batchContentWithPartsStream))
.Transform
.OutputsXml(
output => output
.ConformingTo<Envelope>()
.ConformingTo<Batch.Release>()
.WithStrictConformanceLevel())
.Validate();
}
and produces the following exception System.Xml.XmlException Name cannot begin with the '.' character, hexadecimal value 0x00. Line 1, position 40..
The following test code illustrates the issue
and produces the following exception
System.Xml.XmlException Name cannot begin with the '.' character, hexadecimal value 0x00. Line 1, position 40..