473,473 Members | 2,166 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

encoding xml genned by the getxml method of a dataset

I have a basic question about xml encoding and predefined characters
in xml. I know that characters such as "<" get encoded to &lt; My
question is when does this actually happen? I'm using the getxml()
method of a dataset to build my xml, but before I send it to the
server, I prepend an encoding scheme of UTF-8. Does just adding this
declaration correctly encode the characters on the way to the server
or does it already expect them to be in in the dataset prior to
calling getxml ?

Thanks,
Mark
Nov 12 '05 #1
1 3500
Mark wrote:
I have a basic question about xml encoding and predefined characters
in xml. I know that characters such as "<" get encoded to &lt; My
question is when does this actually happen?
Whenever XML is being serialized to bytes/created/written.

I'm using the getxml()
method of a dataset to build my xml, but before I send it to the
server, I prepend an encoding scheme of UTF-8.


Character encoding has nothing to do with escaping of < and &
characters, it's completely different things. In any XML document, in
any character encoding < and & must be escaped as &lt; and &amp;.

--
Oleg Tkachenko [XML MVP]
http://blog.tkachenko.com
Nov 12 '05 #2

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

Similar topics

0
by: softengine | last post by:
I have a dataset with multiple tables I need exported to Excel. I can get it into Excel into one worksheet however I want there to be one worksheet for each datatable in the dataset. If I dump my...
4
by: Chris | last post by:
I apply a dataview with a filter to a datagrid to remove rows that a user does not want to see. However when I attempt to extract the data from the underlying dataset using GetXML() the entire...
2
by: Rajesh AVRS | last post by:
Hi guys I have a requirement where I needed to extract the DataSet contents as XML. After filling the dataset, I am calling GetXml() and is working fine. However, one of the column which I...
1
by: Kashyap | last post by:
Hi I am trying to convert a dataset to xml using dataset.getxml. But this xml doesn't contain elements for null columns that are present in the dataset. How can we explicitly control this...
3
by: Mark | last post by:
I have run into a problem that I have not found an easy solution for. My data all resides in a dataset and we're using getxml to return the xml and send that on to the webserver for processing. It...
1
by: Elad | last post by:
hi, I'm sorry if this isn't the right group, I just didnt know which category to place this question in. Anyway, I have 2 problems: I got a web service which connects to a DB and puts the data in...
2
by: Ganesh Muthuvelu | last post by:
Hello, I have a schema that contains two "choice" elements, say "F1" and "F2" - meaning either F1 or F2 can be present but not both. I loaded this schema into a dataset, which created two columns...
1
by: lucky | last post by:
Hi guys! i've filled the DatSet object and was trying to get xml data from it. i used GetXml() method for that. it worked fine when all columns of the datatable has data. it generates perfectly...
3
by: Greg Collins [Microsoft MVP] | last post by:
I have a SQL2005 XML column I load into a DataSet. I then bind to a DataGrid. If I set an asp:Literal text value to the DataSet.GetXml() when I first load it into the DataSet, it displays...
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
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
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,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.