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(str ing strValue)
{
int intPstn;
if(strValue.Ind exOf("&") != -1)
{
intPstn = 0;
foreach(Match entMatch in rxEnt.Matches(s trValue))
{
base.WriteStrin g(strValue.Subs tring(intPstn, entMatch.Index - intPstn));
try
{
base.WriteEntit yRef(entMatch.V alue);
}
catch
{
base.WriteStrin g(entMatch.Valu e);
}
intPstn = entMatch.Index + entMatch.Length ;
}
base.WriteStrin g(strValue.Subs tring(intPstn)) ;
}
else
base.WriteStrin g(strValue);
}
Here the base class is XmlTextWriter.
I am getting an error in base.WriteEntit yRef as "Invalid name character in
詳" and please let me know how to resolve it.
Regards,
Vinod
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(str ing strValue)
{
int intPstn;
if(strValue.Ind exOf("&") != -1)
{
intPstn = 0;
foreach(Match entMatch in rxEnt.Matches(s trValue))
{
base.WriteStrin g(strValue.Subs tring(intPstn, entMatch.Index - intPstn));
try
{
base.WriteEntit yRef(entMatch.V alue);
}
catch
{
base.WriteStrin g(entMatch.Valu e);
}
intPstn = entMatch.Index + entMatch.Length ;
}
base.WriteStrin g(strValue.Subs tring(intPstn)) ;
}
else
base.WriteStrin g(strValue);
}
Here the base class is XmlTextWriter.
I am getting an error in base.WriteEntit yRef as "Invalid name character in
詳" and please let me know how to resolve it.
Regards,
Vinod
Comment