.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Post New Web Links

CDATA and ServerURL

Posted By:      Posted Date: August 30, 2010    Points: 0   Category :SharePoint
Hi, I need to get the current sharePoint URL when using CDATA with HTML. how do I do this? anyideas? Thanks <option value="/sites/template/eTMF/Forms/DispForm.aspx?ID=]]></HTML>           <Field Name="ID" />         <HTML><![CDATA[&Source=]]></HTML>         <ListProperty Select="ows_ServerURL" />         <HTML><![CDATA[">Properties </option>  

View Complete Post

More Related Resource Links

WSE 3.0 Can't Serialize String Types as Escaped CDATA

I know I should be using WCF.  HOWEVER, I'm utilizing services provided by Omniture that simply only work well with WSE 3.0 as Omniture's WSDL definitions and service endpoints have compatibility issues that are beyond my control.   While I was able to solve a lot of my compatibility problems with Omniture but there is one issue that is still causing me a lot of heartburn.  When passing strings values through WSE3.0 the Microsoft.Web.Services3.WebServicesClientProtocol class encodes the values as denoted below for the "script" argument.         <soap:Body soap:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/">       <tns:ProductSubmitProductScript>       <productCode xsi:type="xsd:string">123456789</productCode>       <script xsi:type="xsd:string">&lt;genesis&gt;&lt;/genesis&gt;</script>       </tns:ProductSubmitProductScript>    Unfortunately, this encoding isn't going is promptly rejected by Omniture because the xml values are not subsequently decoded on their side.  When passing string values to Omniture they MUST be enclosed in the escape sequenice <![CDATA[ ]]>.  Thus, the prior request should be

using CDATA to delete items

Hi, I'm trying to use CDATA to mimic the contextual menu on sharepoint item, and I'm stuck in the delete process.  Can anyone tell me what's wrong with my delete URL call? (keep getting "Action cannot be completed" Error!) Thanks <HTML><![CDATA[<select  name="menu" onChange="location=this.options[this.selectedIndex].value;"> <option value="/sites/template/_vti_bin/owssvr.dll?CS=65001&Cmd=Delete&List=]]></HTML><ListProperty Select="Name" /><HTML><![CDATA[&ID=]]></HTML><Field Name="ID" /><HTML><![CDATA[&owsfileref=]]></HTML><Field Name="FileRef" /><HTML><![CDATA[&NextUsing=]]></HTML><Field Name="ows_Url" /><HTML><![CDATA[">Delete</option> </select></form>]]></HTML>

how update cdata node?

Hi from spain. how can i update a cdata node in cdata format? I gave this Dim loXMLDoc As XmlDocument = New XmlDocument loXMLDoc.Load(ConfigurationManager.AppSettings("rutabase") + "XX_paginasbase\preferencias.xml") loXMLDoc.SelectSingleNode("preferencias/formularios/emailemisor").InnerText = TextBox_emailemisor.Text.Trim loXMLDoc.SelectSingleNode("preferencias/formularios/emaildestino").InnerText = TextBox_emaildestino.Text.Trim DirectCast(loXMLDoc.SelectSingleNode("preferencias/google/maps").FirstChild, XmlCDataSection).Value = TextBox_googlemaps.Text.Trim loXMLDoc.SelectSingleNode("preferencias/google/analitics").InnerText = TextBox_googleanalitics.Text.Trim loXMLDoc.SelectSingleNode("preferencias/head/keywords").InnerText = TextBox_headkeywords.Text.Trim loXMLDoc.SelectSingleNode("preferencias/head/metas").InnerText = TextBox_headmetas.Text.Trim loXMLDoc.Save(ConfigurationManager.AppSettings("rutabase") + "XX_paginasbase\preferencias.xml") loXMLDoc = Nothing i was tryed with directcast but give error. Any solution? thanks

Xpath for CDATA Section



I am pretty sure you can't xpath the CDATA portion in xml string.

It is possible to read the below xml document's CDATA in to a string and convert the inner text (xml) into an xmldocument?

<book genre="novel" ISBN="1-861001-57-5">
	<title>Pride And Prejudice</title>
		<Licenses>			        <ManufactureDate>12/12/2000</ManufactureDate>


Where to find (or how to make) OOB WebPart CDATA xml for onet.xml file


When you are attempting to add Web Parts in Modules to an onet.xml file, what is the best way to find (or make) the appropriate xml information that goes inside the <[CDATA [ ]]> element.

In particular, I'm trying to add the "Shared Documents" webpart, but from the sts (OOB Team Site template), the onet.xml does not have it listed (or is the oob template for Team Site not "sts"?).

But in general, how do you get this info for customizing web part include referencs in an onet.xml?

MSSQL 2008 xml field CDATA content


How is it possible to store xml (untyped) content with CDATA tags ito a xml field without automatic removing of the CDATA tag?
At the moment I need a second field varchar(max) to store the real xml contet and I use the xml field for xQuery searches.

But there is a problem is characters like '<' in the node text will be replaced with escaped characters! - for other processes I need the real stored content!
To use a xml schema is not possible because the xml structure can be variable - I need untyped xml.

Any sugestions welcome

Thanks for your response

Prevent XML web service/SOAP from enclosing returned data in CData[]


I'm maintaining a legacy XML web service system (Framework 2.0), and is trying to return an XML fragment as part of a SOAP response. Problem is: SOAP will auto-enclose the XML fragment in <[CData[]]> tag, and I want to avoid this.

In short, SOAP Response gave me this:

<MessageContent xmlns=""><![CDATA[&lt;DataSourceResponse&gt;blah..blah..blah..&lt;/DataSourceResponse&gt;]]></MessageContent>

But what I want in the SOAP response is this (without the CData enclosure):

<MessageContent xmlns="">&lt;DataSourceResponse&gt;blah..blah..blah..&lt;/DataSourceResponse&gt;</MessageContent>


xmlserializer is escaping < > : CDATA fields



I'm trying to serialize a XML file, but the XmlSerializer is escaping characters '<' and '>' on CDATA fields.


The code that does it is following :

private void SerializeXml(TestSuite ts)
      XmlSerializer xSeri = new XmlSerializer(typeof(TestSuite));
      StringBuilder sb = new StringBuilder();
      XmlWriterSettings xSettings = new XmlWriterSettings();
      xSettings.Encoding = Encoding.UTF8;
      xSettings.NewLineHandling = NewLineHandling.None;
      xSettings.OmitXmlDeclaration = true;
      //xSettings.OutputMethod = XmlOutputMethod.Xml;
      //xSettings.CheckCharacter = true;

          using (XmlWriter writer = XmlWriter.Create(sb, xSettings))

              xSeri.Serialize(writer, ts);
            catch (Exception e)
              throw e;


Stored XML Data and the CDATA Tag


I’m using a SQL Server 2005 database and xml inserted in a xml data type column is encoded and the cdata tag is removed.  This is by design:  https://connect.microsoft.com/SQLServer/feedback/details/298860/xml-cdata-tag-is-lost-when-converting-to-xml-data-type


Value Inserted:  <person><parents><![CDATA[Mike & Angela Smith]]></parents></person>

Value Returned from a Select:  <person><parents>Mike &amp; Angela Smith</parents></person>

I’m retrieving the xml value from the database using Linq-to-Xml (XElement object) and, ideally, I want to create a xml file on disk that is the same as the value inserted without any special treatment such as decoding each text element and adding the CDATA tags back in. 

What is the best way to handle this scenario?

unable to retrieve specific section in CDATA part of XML with the help of XPath in XSLT



   I am unable to retrieve specific section in CDATA part of XML with the help of XPath in XSLT. How can i navigate into ?Frown

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend