[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Problems with expat parsing entity string in element data...]
- From: Sean Pedersen <sean.pedersen@corp.usa.net>
- To: xml-dev@lists.xml.org
- Date: Wed, 02 May 2001 18:19:34 -0600 (MDT)
I previously wrote:
> 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
> entities?
>
> 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.
By the way,
I have tried using a default handler CB instead of the element data CB
and it made no difference.
-- Sean Pedersen
P.S. Ignore the last question about the %. I misread my program
output. 8^)
>
> 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.
>
> ------------------------------------------------------------------
> The xml-dev list is sponsored by XML.org, an initiative of OASIS
> <http://www.oasis-open.org>
>
> The list archives are at http://lists.xml.org/archives/xml-dev/
>
> To unsubscribe from this elist send a message with the single word
> "unsubscribe" in the body to: xml-dev-request@lists.xml.org
----------------------------------------------------------------------------
| |
| "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.