Currently this would be a sample XML that I am working on:
<smsq>
<sms>
<id>96</id>
<to>03333560511</to>
<msg> danial says: hahaha <space> nothing.
</msg>
</sms>
</smsq>
Now please notice, that the tag can contain other tags (which should not be parsed) and I had to make a dtd for that. The dtd was something like this:
<!DOCTYPE smsq [
<!ELEMENT sms (mID,to,msg,type)>
<!ELEMENT mID (#PCDATA)>
<!ELEMENT to (#PCDATA)>
<!ELEMENT msg (CDATA)>
]>
But the problem is that XML parser still goes in the tag and says that the tag should be closed with a tag. I just want to fetch the data as it is from the XML and I do not want to parse msg further.
Please help me resolve the problem and tell me if this can be done with DTDs.
Thanks!