Hi All,
I am facing an issue in the XmlTextWriter class in the dotnet 2.0.
This is the sample code
Actual XML is like this
<Name>詳細仕様に</Name>
code:
strvalue = "詳細仕様に"
public override void WriteString(string strValue)
{
int intPstn;
if(strValue.IndexOf("&#") != -1)
{
intPstn = 0;
foreach(Match entMatch in rxEnt.Matches(strValue))
{
base.WriteString(strValue.Substring(intPstn, entMatch.Index - intPstn));
try
{
base.WriteEntityRef(entMatch.Value);
}
catch
{
base.WriteString(entMatch.Value);
}
intPstn = entMatch.Index + entMatch.Length;
}
base.WriteString(strValue.Substring(intPstn));
}
else
base.WriteString(strValue);
}
Here the base class is XmlTextWriter.
I am getting an error in base.WriteEntityRef as "Invalid name character in 詳" and please let me know how to resolve it.
Regards,
Vinod
Not the answer you were looking for? Post your question . . .
183,630 Experts ready to help you find a solution.
Sign up for a free account, or
Login (if you're already a member).