• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: substring (or) CDATA XML PARSING?!
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: substring (or) CDATA XML PARSING?!


  • Subject: Re: substring (or) CDATA XML PARSING?!
  • From: Drew Lawson <email@hidden>
  • Date: Fri, 10 Apr 2009 09:12:22 -0400

According to developers mac:

> Thanks for the response david. I am already paring the xml using NSXML
> parser alone. but My problem is, the CDATA is not present inside a node. I
> can get <id> & <name> values by reading the node using XML parser. Is there
> any other way?

The CDATA will be a text node.  At least that's what the cods say
for tree/DOM handling.  I've never used the SAX stuff.

http://developer.apple.com/documentation/Cocoa/Conceptual/NSXML_Concepts/Articles/NSXMLDataModel.html

  One thing you might notice about the above list is that it does
  not contain all possible kinds of XML-markup constructs. The most
  notable omissions are CDATA sections and character and entity
  references. When NSXML processes an existing document, it resolves
  any character or entity references into standard text nodes unless
  the appropriate fidelity options are set. Even when CDATA and
  character and entity references are preserved, NSXML treats them
  as no more than special-cased text nodes.

So your data should be a text node as the sibling after <name>, at
least that's my reading of it.

Try iterating over the nodes and logging the node type.  It's
probably in there.

--
 Drew Lawson

 ". . . And I never give a reason"
    -- God, as channeled by Seven Nations
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >substring (or) CDATA XML PARSING?! (From: developers mac <email@hidden>)
 >Re: substring (or) CDATA XML PARSING?! (From: david paeme <email@hidden>)
 >Re: substring (or) CDATA XML PARSING?! (From: developers mac <email@hidden>)

  • Prev by Date: Re: Creating a Remote database connection.
  • Next by Date: Re: Change view on resize
  • Previous by thread: Re: substring (or) CDATA XML PARSING?!
  • Next by thread: Re: substring (or) CDATA XML PARSING?!
  • Index(es):
    • Date
    • Thread