Wrox Programmer Forums
Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
|
C# 2008 aka C# 3.0 Discuss the Visual C# 2008 (aka C# 3.0) language
Welcome to the p2p.wrox.com Forums.

You are currently viewing the C# 2008 aka C# 3.0 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old September 3rd, 2009, 08:09 AM
Authorized User
 
Join Date: Jul 2007
Posts: 29
Thanks: 2
Thanked 0 Times in 0 Posts
Default Reading XML data with CDATA in it.

Hi,
I have an xml file in the following format

<Company>
<CompanyCode><![CDATA[A00000]]></CompanyCode>
<CompanyName><![CDATA[A.B. CCCCCC, Inc.]]></CompanyName>
<DepartmentBuilding><![CDATA[]]></DepartmentBuilding>
<StreetAndNumber><![CDATA[111 Nnnn 3rd Street]]></StreetAndNumber>
<StreetAndNumberLine2><![CDATA[]]></StreetAndNumberLine2>
<ZipCode><![CDATA[55555]]></ZipCode>
<City><![CDATA[MILWAUKEE]]></City>
<Company>

How would I go about reading the actual data from any of the tags?
 
Old September 3rd, 2009, 08:11 AM
samjudson's Avatar
Friend of Wrox
 
Join Date: Aug 2007
Posts: 2,128
Thanks: 1
Thanked 189 Times in 188 Posts
Default

The XML parser will do all the work for you. Use whatever technique you would use to read normal XML.
__________________
/- Sam Judson : Wrox Technical Editor -/

Think before you post: What have you tried?





Similar Threads
Thread Thread Starter Forum Replies Last Post
How to strip out CDATA from xml with XSLT XSLUSer XSLT 10 March 17th, 2009 11:28 AM
Using Xpath on an XML wrapped in CDATA akentanaka XSLT 4 March 11th, 2009 05:26 AM
SQL Server 2005 XML: FOR XML PATH -> cdata? stoves SQL Server 2005 1 July 8th, 2008 02:40 AM
Extract the XML file from CDATA haixia XSLT 2 August 3rd, 2006 02:01 PM
how to post xml data to server and reading back js_pandey PHP How-To 0 March 29th, 2006 01:48 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.