html - How should CDATA block parsing in XML behave? -


given xml snippet:

<title><![cdata[resizing & cropping gif , png images issue]]></title> 

what correct string should parsed xml parser <title> element content?

1. "resizing & cropping gif , png images issue" 2. "resizing &amp; cropping gif , png images issue" 

note: i'm using rome feed parsing library java, parses #2, understanding of cdata blocks should #1. i've found evidence on web suggests #2 both right (also here) , wrong - i'm bit perplexed (and curious) this.

well can tell there big difference 2nd link think it's "wrong". using titles , not links/urls. use 2nd 1 valid xml. understand cdata ignore it, i'm not sure why want ignore title.

what planning on using for? seems me want not cdata everything, beauty in valid xml know should display consistent xml parsers.


Comments

Popular posts from this blog

linux - Mailx and Gmail nss config dir -

c# - Is it possible to remove an existing registration from Autofac container builder? -

php - Mysql PK and FK char(36) vs int(10) -