Rahul,
even if you have a schema telling the validator that anything can be placed inside the testNode, the SAX interface will still treat <anyElement> as an element, and not as a character string.

Alberto

Rahul wrote:
Hi All,

        I am using SAX2 API for parsing XML document against a schema.

For a schema of this type:

   <xs:complexType name="testNode">

     <xs:sequence>

       <xs:any processContents="lax" />

    </xs:sequence>

  </xs:complexType>

When the received buffer is:

<testNode>

<anyElement>helloworld</anyElement>

</testNode>

When Parser encounters anyElement it is giving startElement callback with
element name as anyElement..
I think it should give "<anyElement>helloworld</helloworld>" as input in
callback "characters" of testNode.

Please let me know if my understanding is correct or I am missing something.

Regards,

Rahul

****************************************************************************
*********************************************

            This e-mail and attachments contain confidential information
from HUAWEI, which is intended only for the person or entity whose address
is listed above. Any use of the information contained herein in any way
(including, but not limited to, total or partial disclosure, reproduction,
or dissemination) by persons other than the intended recipient's) is
prohibited. If you receive this e-mail in error, please notify the sender by
phone or email immediately and delete it!



Reply via email to