.NET GENERATE xml PROBLEM

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Agnes

    #1

    .NET GENERATE xml PROBLEM

    In my .net ,i need to generate an xml file , however, user may input a
    chinese character, Then , the xml will got something unknow characters. the
    following is my code, Does anyone know how to solve it ??

    Private Sub Init()
    With AMSXML
    ..Formatting = Formatting.Inde nted
    ..Indentation = 4
    ..IndentChar = " "
    ..WriteStartDoc ument()
    ..WriteDocType( "SOGenericInter change", Nothing, "SOGenericInter change.dtd",
    Nothing)
    ..WriteStartEle ment("SOGeneric Interchange")
    End With

    End Sub
    Private Sub InterchangeHead erIdentificatio n()
    Try
    With AMSXML
    ..WriteStartEle ment("Interchan geHeaderIdentif ication")
    ..WriteElementS tring("senderID ", strSenderid)
    ..WriteElementS tring("intercha ngeControlRefer ence", strFilename)
    ..WriteElementS tring("recipien tID", strReceiveId) <--- problem here .
    ..WriteElementS tring("payerID" , "")
    ..WriteEndEleme nt()
    ............... ...............


Working...