OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Problems with expat parsing entity string in element data...

I am using expat to parse some simple xml messages.  I only use a
start element CB, end element CB, and element data CB.  I discovered
recently that if the element data contains entities (like '''),
it breaks the element data text apart and makes multiple calls to my
element data CB.  Since I was assuming that the element data CB would
receive everything between the start and end tag (ie. the len parameter
would be that large), I don't do any state tracking.  Now that I know
the inclusion of entities will result in multiple calls to the the
element data CB, I will have add state maintainence code.  Is there
any way to force expat to NOT seperate the element data when it includes

I realize that expat is probably conforming to some XML standards
requirement, but I don't know XML that well, so I don't know.  I have
read the article on expat by Clark Cooper, and the expat FAQ, but did
not find the answer to my problem there.  If someone could point me in
the right direction, I would appreciate it.

Also, why will a '%' character be converted to '%25' by expat?  Since my
code has to do some encoding after processing ( '&', '=', and '%'), this
action by expat complicates my task.

Thanks for any help.                             -- Sean Pedersen

|                                                                          |
|  "A ship in a harbor is safe but that is not what ships are built for."  |
|                                                                          |
|  Sean Pedersen                               sean.pedersen@corp.usa.net  |
|  Software Engineer II                           Office:  (719) 785 2313  |
|  USA.NET, Colorado Springs, CO                  Fax:     (719) 785 2361  |

This email message is for the sole use of the intended recipient(s) and may contain confidential and privileged information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply email and destroy all copies of the original message.