convert data from xml to UTF-16 encoded string


How i can convert string from xml parameter to UTF-16 encoded string?

For example: I response string as "0x0009"  and want convert it to "New line" or "0x000A" to  horizontal tab.

I attempt using Char.ConvertFromUtf32 but before i must convert "0x0009" to is don't work.


9/12/2008 11:14:57 AM 7181 articles. 0 followers. Follow

1 Replies

Similar Articles

[PageSpeed] 33

Hi _bitblock ,

I attempt using Char.ConvertFromUtf32 but before i must convert "0x0009" to is don't work.

Try :

int test = Convert.ToInt32("0x0009", 16);


Samu Zhang
Microsoft Online Community Support

Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question.
9/18/2008 10:49:56 AM

Similar Artilces:

Xml Convert string to xml
Hi I have a save the file xml to database as TEXT, I would have to read the field of the db, and reading the tag of the xml Can Help me Thank's...

Problem loading an xml string containing xml data into XML document
 Hi all,I have a problem loading an xml string containing xml response data returned by other server(spatial server) into XML document some times becoz the returned xml response contains special chars like <, >, ', etc.Is there any way to parse this XML response string before loading into XML document. Hi Bharath, if you can't find a ready made one you can write one yourself. Parse the string that you get for the elements that it would contain and inject the CDATA element between them to allow special character. example if you have a string <childNode>This con...

Converting XML string into XML Document
I am calling a web service which returns an XML string containing numerous fields which I need to obtain the values against.I have done the following so far, in an effort to retrieve the values within the XML, but it appears that despite loading this XML string into an XMLDocument, the entire string is assigned as the InnerHTML of the XMLDocument, but there are no nodes/entities etc.// Extract return fields from the Web Service (result is the xml string response from the webservice).StringReader sr = new StringReader(result);XmlDocument xmlDoc = new XmlDocument();xmlDoc.Load(sr);// These are...

problem in converting an xml string back to xml
Hi,When I try to convert an xml string back to XmlDocument I am getting an XmlException saying “The root element is missing”. This exception occurs when the xml is not well formed or if the xml is blank. But here the xml string starts like below:"<?xml version=\"1.0\" It is well formed but I am wondering if this exception is caused by the back slashes. These back slashes were added automatically when I converted the xml to string.I am using the following code to convert the xml String back to XML://XMLRequest is a string which contains the xml XMLRequest = XM...

reading data from xml service or xml datasource
Hi, I'm trying to figure out a way to import data (but not export to, I'm just trying to get their news section) from an external db (SqlServer 2000 or 2005) to a gridview and detailsview on my site (resides at a web host). I spoke to the organisation that owns the external db and they are willing to look into several solutions, whitout giving out their db password etc. Not suprisingly, I was reccomended using a web service. However, I believe I need to install stuff in order to enable one, and so, it won't be able for me (I guess), because of my web host's limitations. Instead, I am now t...

XML in, XML out
Hi All (and a happy holiday to those that will get a break), I am trying to read in an XML file of addresses. I need to remove all the address data from the file where code =~ /^000/ (there are none in the example data below). I need to reproduce that data 'as is', so I need to honour the tag structure, although the order of the tags doesn't need to be honoured. I have been trying to use XML::Simple and I had a go with XML::Smart but I haven't been able to get the results I want. My best effort is below (with XML::Simple). There are a couple of differences ...

XMl to XML
Hello,   I retrieved an XML from the dataset which retrieves data from the table in the database. I need to present the data  in a different structure. Is XSLT the way or are there any other options. please let me know. Thanks!! Yes XSLT is a good choice to convert xml file to other forms. You can take a look at XSLT Tutorial.Sincerely,Young Fang...

XML Headache
I have a web app that needs to send utf-16 encoded xml doc to the client. I have tried a number of things but always got the following error: A name was started with an invalid character. Error processing resource 'http://localhost/testWebSite/test.aspx'. Line 1, ... < ------------------------------------ here is my testing code in test.aspx.cs: protected void Page_Load(object sender, EventArgs e) { Response.Charset = "utf-16"; Response.ContentType = "text/xml"; String text = "<?xml version=\"1.0\" encoding=\"utf-16\"?>" + "<test><node1>" + DateTime.Now.T...

Convert Data to a String then write to xml file
Hello, After a couple of days of search and trying different code I need some help.  I am trying to convert some data from a SqlDataSource to a String and then write it to a xml file. I would like to take the <%# Eval("Title") %> from: (using the code behind file, aspx.vb) <asp:DataList ID="DataList1" runat="server" DataKeyField="ID" DataSourceID="SqlDataSource1" Width="500px"> <ItemTemplate> <br /> <asp:HyperLink ID="TitleHyperLink1" runat="server" NavigateUrl='<%# Eval("link") %>' Text='<%# Eval("Title") %>'></asp:HyperLink><b...

Convert XML to another XML
Hi, I have an XML file, that I want to convert into another XML file (either identical to the original, or sorted, or filtered, doesn't matter). I do not want to convert it to HTML or XHTML. That, I know how to do.  I read that I have to include: <xsl:output method="xml" version="1.0" encoding="ISO-8859-1" omit-xml-declaration="no" indent="yes"/> But it's not working. Even the xml declarations do not appear in the output. And how do I copy the xml tags to the result? Thanks.  ...

D2009: Problem using FormatXMLData for UTF-8 encoded xml string
Hi, I am using Delphi 2009. I have a TClientDataSet instance store some unicode data. I use TClientDataSet.SaveToStream to save the data to a string stream as UTF-8 encoded string: S := TStringStream.Create(''); ClientDataSet1.SaveToStream(S, dfXMLUTF8); The following is an example of the UTF-8 encoded XML string: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <DATAPACKET Version="2.0"><METADATA><FIELDS><FIELD attrname="F1" fieldtype="string.uni" WIDTH="40"/>...

Retreive xml data from sql 2005 xml data type column
 hi everyone, I am in a messy situation and dieing to get rescued.I have a database with an untyped  xml datatype column named xmlfile.  The xml inside is invoice of customer & looks like this.<User><INVOICE><BILL Time="May 18 2008 12:47AM">0.1869</BILL><BILL Time="May 18 2008  1:00AM">22.25</BILL><BILL Time="May 18 2008  1:00AM">22.25</BILL></INVOICE></User>I wanted to retrieve the <BILL></BILL> Elements and put it through asp:datagrid or asp:repeater . I w...

Read XML data from SQL Server XML data type field
Hi,does anyone actually use the XML data type for SQL Server database columns? I can't really find any help for my problems.In my database there is a table with personal data such as name, telephone and so one. One of the columns is of type XML, because I need to store multilingual data in there, something like:<career>     <careertext lang="en">My career</careertext>    <careertext lang="de">Meine Karriere</careertext></career>I'm using a Stored Procedure to retrieve all data from the database and in my data access object th...

Write Datatable data to XML string for database storage (.NET 1.1)
How can I write a datatable's content as an XML String for storing in a database? The only examples I found were for writing to an XML file. Thanks in advance. Hi, see this sample. where dt is your datatable StringWriter stringWriter = new StringWriter(); dt.WriteXml(stringWriter, XmlWriteMode.WriteSchema); string s = stringWriter.ToString(); Please mark post as answer if it helped youMy Blog...

Web resources about - convert data from xml to UTF-16 encoded string -

File:Convert to SVG and move to Commons.svg - Wikipedia, the free encyclopedia
As a courtesy (but not a requirement), please e-mail me or leave a note on my talk page if you use this image outside of Wikipedia. Thanks! As ...

Facebook Co-Founder Dustin Moskovitz Sells 450K Shares, Converts 7M More
The great Facebook stock sale frenzy continues on with a report that Co-Founder Dustin Moskovitz unloaded 450,000 shares in the social network ...

Facebook Announces “App2User” Liquidity Program for Merchants to Convert Rewards Points into Credits
... for Credits, just announced a new Credits program called “App2User,” designed to enable merchants and loyalty program operators to convert their ...

How to Convert Leads Into Buying Customers - The 9 Step Sales Process EVERYONE Should Use
... School of Business in Toronto on the topics of Sales and Entrepreneurship. I shared with them the sales process that I find How to Convert Leads ...

Bitcoin : Should I convert my savings to Bitcoin?
Answer (1 of 7): You should think of this question as "Should I invest all my savings in Bitcoin?", and not "Should I have my savings denominated ...

Convertizo 2 - Convert Units and Currency in Style on the App Store on iTunes
Get Convertizo 2 - Convert Units and Currency in Style on the App Store. See screenshots and ratings, and read customer reviews.

Radical plan to convert Domain Stadium into a wave park
The man behind a radical plan to convert Domain Stadium into an artificial wave park, says it will become &nbsp;a sporting spectacle for wave-starved ...

WWE diva converts to Christianity, confesses to a life of sin
Stunning wrestling diva Taryn Terrell has shared a dramatic knock-down testimony of conversion from life in the ring to life with Christ.

Microsoft converts more customers into testers with Office Insider preview program
Microsoft today launched a new preview program for consumers who subscribe to Office 365 that will give them a sneak peak at new features slated ...

'Water Bug' Robot Digests Pollution, Converts it to Electricity
The Row-Bot was capable of generating more energy than it needed.

Resources last updated: 11/24/2015 4:58:08 PM