473,396 Members | 2,026 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,396 software developers and data experts.

Special Character inside XML string data

I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out

strXML = "<?xml version='1.0'?>" & vbCRLF
strXML = strXML + "<WO_Step>" & vbCRLF
strXML = strXML + "<Test>Test Special Characters #, %, &,
<, > </Test>
strXML = strXML + "</WO_Step>"

What is the best way to pass this type of information?
Would changing the encoded of the XML string work.
Nov 22 '05 #1
5 9560

"Norman Uhlenkott" <NB******@gapac.com> wrote in message
news:05****************************@phx.gbl...
I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out

strXML = "<?xml version='1.0'?>" & vbCRLF
strXML = strXML + "<WO_Step>" & vbCRLF
strXML = strXML + "<Test>Test Special Characters #, %, &,
<, > </Test>
strXML = strXML + "</WO_Step>"

What is the best way to pass this type of information?
Would changing the encoded of the XML string work.


No, you can't store it this way, use XmlWriter.
Nov 22 '05 #2
You could try somthing like this. I think it will work.
<![CDATA[somedatahere&moredatahere]]> for example

"Norman Uhlenkott" <NB******@gapac.com> wrote in message
news:05****************************@phx.gbl...
I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out

strXML = "<?xml version='1.0'?>" & vbCRLF
strXML = strXML + "<WO_Step>" & vbCRLF
strXML = strXML + "<Test>Test Special Characters #, %, &,
<, > </Test>
strXML = strXML + "</WO_Step>"

What is the best way to pass this type of information?
Would changing the encoded of the XML string work.

Nov 22 '05 #3
Let me clarify that a bit more. the somedatahere and the moredatehere is
straight text. The example would add the literal "somedatahere&moredatahere"
"vMike" <Mi************@gewarren.com.nospam> wrote in message
news:bq**********@ngspool-d02.news.aol.com...
You could try somthing like this. I think it will work.
<![CDATA[somedatahere&moredatahere]]> for example

"Norman Uhlenkott" <NB******@gapac.com> wrote in message
news:05****************************@phx.gbl...
I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out

strXML = "<?xml version='1.0'?>" & vbCRLF
strXML = strXML + "<WO_Step>" & vbCRLF
strXML = strXML + "<Test>Test Special Characters #, %, &,
<, > </Test>
strXML = strXML + "</WO_Step>"

What is the best way to pass this type of information?
Would changing the encoded of the XML string work.


Nov 22 '05 #4
"Norman Uhlenkott" <NB******@gapac.com> wrote in message
news:05****************************@phx.gbl...
I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out
For the following special chars in the 1st column use the sequences in the
2nd column.
& &amp;
< &lt; &gt; " &quot;
' &apos;
strXML = strXML + "</WO_Step>"


For example,
strXML = strXML + "&lt;/WO_Step&gt;"

-- Alan
Nov 22 '05 #5
"Norman Uhlenkott" <NB******@gapac.com> wrote in message
news:05****************************@phx.gbl...
I would like to be able to put in special character inside
an xml data string (#, <, >, &).
when it trys to parses out the XML String it errors out
For the following special chars in the 1st column use the sequences in the
2nd column.
& &amp;
< &lt; &gt; " &quot;
' &apos;
strXML = strXML + "</WO_Step>"


For example,
strXML = strXML + "&lt;/WO_Step&gt;"

-- Alan
Nov 22 '05 #6

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

Similar topics

17
by: Pikkel | last post by:
i'm looking for a way to replace special characters with characters without accents, cedilles, etc.
3
by: Barry Olly | last post by:
Hi, I'm working on a mini content management system and need help with dealing with special characters. The input are taken from html form which are then stored into a varchar column in...
4
by: Norman Uhlenkott | last post by:
I would like to be able to put in special character inside an xml data string (#, <, >, &). when it trys to parses out the XML String it errors out strXML = "<?xml version='1.0'?>" & vbCRLF...
3
by: ATH0 | last post by:
How to search for special character { } and how to count them.. I got field called text ( undefined length ) and in this field you must define "{" as start and "}" as end of some text line. If...
4
by: Ewok | last post by:
let me just say. it's not by choice but im dealing with a .net web app (top down approach with VB and a MySQL database) sigh..... Anyhow, I've just about got all the kinks worked out but I am...
17
by: Carl Mercier | last post by:
Hi, Is it possible to use special characters like \n or \t in a VB.NET string, just like in C#? My guess is NO, but maybe there's something I don't know. If it's not possible, does anybody...
1
by: sonald | last post by:
Dear All, I am working on a module that validates the provided CSV data in a text format, which must be in a predefined format. We check for the : 1. Number of fields provided in the text file,...
7
by: Trac Bannon | last post by:
When I load XML from a file into a dotNet XMLDataDocument, the UTF-8 codes are resolved but the 5 special XML entities are not. How can I force those 5 special character types to be translated?
7
by: petedawn | last post by:
hi guys, based on users button press i am passing the following to my javascript function, test('&eacute;'). and within my javascript i have this function test(x) which processes this input. ...
3
KevinADC
by: KevinADC | last post by:
Purpose The purpose of this article is to discuss the difference between characters inside a character class and outside a character class and some special characters inside a character class....
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: 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
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
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...

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.