473,394 Members | 1,701 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,394 software developers and data experts.

XML Element must have CDATA tages around it.

I am consuming a web service hosted by one of our clients. One of the
string properties of the object I am creating to pass to their web service
is called CustomerName. The XML they re receiving I just a standatd xml
elemnt:

<CustomerName>Joe Friday</CustomerName>

The client has told me that the customer name, Joe Firday, needs to have
CDATA tags around it:

<CustomerName>![CDATA[Joe Friday]]</CustomerName>

How can I get VS.NET 2003 to serialize the customer name in this way?

Thanks in advance.

Mike R
Nov 23 '05 #1
1 4800
Thanks for all your help Dan.

The problem I have here is really the client. They cannot make any changes
to their web service because of their development cycle will push the
project back 3 months. I'm having to back my code into a poorly designed
and poorly written web service. Their web service was written by hand and is
not compliant. It's too hard to explain everything going on on their side.
That is why I am having so many problems. This is another example.

The program that is running on their side will crash is it doesn't see CDATA
tags around the customer name. So in the SOAP message I send them I need
the CDATA tags around customer name.

Thanks,

Mike

"Dan Rogers" <da***@microsoft.com> wrote in message
news:19**************@TK2MSFTNGXA02.phx.gbl...
Why would they want to do this? I'd question that practice since there
really is no reason to expect the XML passed to pass non-safe XML.
--------------------
From: "Mike" <mr********@NOSPAMATALLcalibrus.com>
Subject: XML Element must have CDATA tages around it.
Date: Fri, 4 Mar 2005 11:16:53 -0700
Lines: 19
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
Message-ID: <uv**************@TK2MSFTNGP12.phx.gbl>
Newsgroups:

microsoft.public.dotnet.framework.aspnet.webservic es,microsoft.public.dotnet
framework.webservices,microsoft.public.webservices
NNTP-Posting-Host: 206-169-51-163.gen.twtelecom.net 206.169.51.163
Path:

TK2MSFTNGXA02.phx.gbl!cpmsftngxa10.phx.gbl!TK2MSFT FEED01.phx.gbl!TK2MSFTNGP0
8.phx.gbl!TK2MSFTNGP12.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl

microsoft.public.dotnet.framework.webservices:9614
microsoft.public.webservices:2751
microsoft.public.dotnet.framework.aspnet.webservic es:28418
X-Tomcat-NG: microsoft.public.dotnet.framework.aspnet.webservic es

I am consuming a web service hosted by one of our clients. One of the
string properties of the object I am creating to pass to their web service
is called CustomerName. The XML they re receiving I just a standatd xml
elemnt:

<CustomerName>Joe Friday</CustomerName>

The client has told me that the customer name, Joe Firday, needs to have
CDATA tags around it:

<CustomerName>![CDATA[Joe Friday]]</CustomerName>

How can I get VS.NET 2003 to serialize the customer name in this way?

Thanks in advance.

Mike R

Nov 23 '05 #2

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

Similar topics

2
by: Rick | last post by:
Hi.. I've got some code I wrote in PHP that will generate a new argument string for the browser, but the xhtml parser in Firefox and Opera both complain about my use of &var=value pairs. Below...
1
by: Marlin | last post by:
I am inquiring for a customer of mine who is using XMetal 3.0 as an XML editor. I am trying to add default content to an element so that this content is inserted when the element is inserted. ...
0
by: Erwan | last post by:
Hi I have the following DTD (extract) <!ELEMENT d_field (table_ref?, item*, lst_caption?, frm_caption?, frm_layout?, frm_alert_onvalid?, input?, list?)> <!ELEMENT input (onvalid?)> <!ATTLIST...
2
by: X. Lee | last post by:
I am creating an xml schema, and I want one of the elements to include html text. Therefore, I want to make that element a CDATA elements so that it can accept html tags as part of it's value. ...
11
by: Dom | last post by:
Hi, I wanted to use the Button Element to submit a form like this example: <form action="/test.exe" method="post"> <button id="ID_BUTTON_OK" name="_WEB_EVENT_HANDLER_" type="submit"...
7
by: PeteC | last post by:
I'm working on a web page which has some form elements in it which I need to manipulate using JavaScript. If the element is (for example, in a form called TicketForm) <INPUT...
1
by: unwiseone | last post by:
Hello, Does any know how to specify a value of a DTD element? For example, here's an external DTD that I have: ======================================= <!ELEMENT summercamps (Camp+)>...
2
by: DesperateDan | last post by:
As the title say, I can't aquire element's value if it hosts sub-elements. Let me explain - My XML looks like this:- <a> <infill>xxxxxx</infill> <SourceEndPoint>testdata <EndPoint> <AliasRef...
1
by: soccerdad | last post by:
I've got a class hierarchy generated from a .xsd schema file using the XSD.EXE tool. One of the elements will have its "inner text" set to a CDATA block. The XSD.EXE tool exposed a "Value" property...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
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...
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
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
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.