blanketboy
September 19th, 2003, 06:55 AM
I have an asp file which generates xml with values from a ms access database. My page has a form which allows a user to type in their first Name. The name is then entered into the database. My asp file runs and generates the xml with values from the database.
code snippet : my asp file :
<User>
<Title1><%=oRs.Fields("Title")%></Title1>
<Name><%=oRs.Fields("Name")%></Name>
</User>
The problem is : Someone enters a Name called Esm¨¦. As you can see the last character of her name is a bit weird. Her name gets properly written to the database however my xml gets messed up.
This is what now happens to my xml:
<User> <Title1>Miss</Title1> <Name>Esm´żName>
</User>
The weird character causes a problem. Now the Name tag is not closed as it should be. The xml document is not well formed. Another part of my application loads the xml document, but it cant load because the document is not proper.
Any suggestions on how I can fix this problem?
Any Help is gladly appreciated!
Thanks!
;)
code snippet : my asp file :
<User>
<Title1><%=oRs.Fields("Title")%></Title1>
<Name><%=oRs.Fields("Name")%></Name>
</User>
The problem is : Someone enters a Name called Esm¨¦. As you can see the last character of her name is a bit weird. Her name gets properly written to the database however my xml gets messed up.
This is what now happens to my xml:
<User> <Title1>Miss</Title1> <Name>Esm´żName>
</User>
The weird character causes a problem. Now the Name tag is not closed as it should be. The xml document is not well formed. Another part of my application loads the xml document, but it cant load because the document is not proper.
Any suggestions on how I can fix this problem?
Any Help is gladly appreciated!
Thanks!
;)