Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 2008 > C# 2008 aka C# 3.0
Password Reminder
Register
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
DRM-free e-books 300x50
 
 
Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old September 3rd, 2009, 08:09 AM
Authorized User
Points: 135, Level: 2
Points: 135, Level: 2 Points: 135, Level: 2 Points: 135, Level: 2
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Jul 2007
Location: , , .
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?
  #2 (permalink)  
Old September 3rd, 2009, 08:11 AM
samjudson's Avatar
Friend of Wrox
Points: 8,687, Level: 40
Points: 8,687, Level: 40 Points: 8,687, Level: 40 Points: 8,687, Level: 40
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Aug 2007
Location: Newcastle, , United Kingdom.
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?
 


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


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



All times are GMT -4. The time now is 01:08 PM.


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