#278 Expat can't handle "Father&Son" string

Not a Bug
closed-invalid
None
5
2003-10-18
2003-10-17
No

Hello!

I have got the XML document described belowe:

<?xml version="1.0" encoding="UTF-8"?>
<NAME>Father&Son</NAME>

When expat calls the handler function:

static void characterData
(
void *userData,
const XML_Char *s,
int len
)

variable *s contains string "Father" and I am wondering
why is the original string "Father&Son" truncated.
I have compiled expat lib 1.95.6 in HP-UX with default
options. Is there any chances to get this working?

Regards
Jouni

Discussion

  • Karl Waclawek

    Karl Waclawek - 2003-10-17

    Logged In: YES
    user_id=290026

    Are you aware of this part of the documentation for
    the character data handler?

    <quote>
    A single block of contiguous text free of markup may still
    result in a sequence of calls to this handler. In other words,
    if you're searching for a pattern in the text, it may be split
    across calls to this handler.
    </quote>

     
  • Karl Waclawek

    Karl Waclawek - 2003-10-17
    • assigned_to: nobody --> kwaclaw
     
  • Fred L. Drake, Jr.

    Logged In: YES
    user_id=3066

    The documentation covers this; this is normal for a SAX-like
    parser.
    Closing this report as not a bug.

     
  • Fred L. Drake, Jr.

    • milestone: --> Not a Bug
    • status: open --> closed-invalid
     

Log in to post a comment.