Hi I am using XML Serialization to de-serialize an XML Document as below.

<?xml version="1.0" encoding="utf-8"?>
<xmlRoot>
<NodeA Type="X" Name="xyz" Value="123"/>
<NodeB>content</NodeB>
</xmlRoot>

The content in Bold above is another XML string (e.g. <fetch Version="1.0" Count="10"><Entity Name="XXX"/></fetch>) that I want to retrieve as is.

My serialization class looks as below.

using System;
using System.Xml.Serialization;

namespace MySpace
{
[XmlRoot("xmlRoot")]
public class xmlRoot
{
private NodeA element_nodeA;
private string element_nodeB;

[XmlElement("NodeA")]
public NodeA NodeA
{
get { return this.element_nodeA; }
set { this.element_nodeA = value; }
}

[XmlElement("NodeB")]
public string NodeB
{
get { return this.element_nodeB; }
set { this.element_nodeB = value; }
}
}
}

But the above model is not able to get me the result. It fails in retrieving the NodeB as text due to the actual content being an XML content in itself.

Can someone please advise?