473,407 Members | 2,315 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,407 software developers and data experts.

User entered data in XML

I'm writing data the user enters out to an XML file (using DataSet.WriteXML;
DataSet is a typed DataSet created from an XML Schema). The problem I'm
having is the user can (and needs to) enter characters like &, < and >. Is
there some .NET function (maybe something in System.Xml) that will take a
string and format it for output to an xml file (such as change all &'s to
&amp;, etc.)? I'd hate to have to do String.Replace("&",
"&amp;").Replace(...).Replace(...) all the fields manually, but if that's my
only alternative...
Nov 12 '05 #1
1 1138
Nevermind, I just realized that DataSet.WriteXml(...) does the conversions
from & to &amp;, etc. already. I must have manualy edited the .xml in
notepad and added the &. Doh!

"nobody" <no****@no.server> wrote in message
news:e1**************@tk2msftngp13.phx.gbl...
I'm writing data the user enters out to an XML file (using DataSet.WriteXML; DataSet is a typed DataSet created from an XML Schema). The problem I'm
having is the user can (and needs to) enter characters like &, < and >. Is there some .NET function (maybe something in System.Xml) that will take a
string and format it for output to an xml file (such as change all &'s to
&amp;, etc.)? I'd hate to have to do String.Replace("&",
"&amp;").Replace(...).Replace(...) all the fields manually, but if that's my only alternative...

Nov 12 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: R Bolling | last post by:
I am using a routine to check to see if a phone number (PK) has alread been entered, and takes the user to that record if it is found -- as follows: Private Sub...
4
by: santa19992000 | last post by:
can I use scanf to get input (some times user enters input sometimes not, just hit keyboard)?. It displays to enter IP address, if user wants to change, then he enters, otherwise he hits keyboard,...
4
by: louise raisbeck | last post by:
I have this scenario (simplified) function addnewdata () { check for partial match already in db for information entered by user if (partialmatch succeeds) { open new window aspx page (using...
1
by: panche | last post by:
I'm developing a fairly simple user control that has two textboxes for date/time entry (a from date/time and a to date/time). One of my requirements is that there should be no button that sets...
3
by: hary08 | last post by:
im doing a database for Hospital Admission, I have a log in form which prompt user for a password. The source of log in is to look for the values in my Table tblEmployees and match user name and...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.