You are viewing a plain text version of this content. The canonical link for it is here.
Posted to c-dev@xerces.apache.org by "Jean-Michel Richer (JIRA)" <xe...@xml.apache.org> on 2012/06/04 10:44:22 UTC

[jira] [Created] (XERCESC-1985) I get empty strings from the startElements

Jean-Michel Richer created XERCESC-1985:
-------------------------------------------

             Summary: I get empty strings from the startElements
                 Key: XERCESC-1985
                 URL: https://issues.apache.org/jira/browse/XERCESC-1985
             Project: Xerces-C++
          Issue Type: Bug
          Components: Validating Parser (XML Schema)
    Affects Versions: 3.1.1
         Environment: Linux Ubuntu 12.04
            Reporter: Jean-Michel Richer
            Priority: Minor


I have installed xerces 3.1.1 and xalan 1.11. I have developped a simple Handler (inherited from DefaultHandler) but when I parse an xml file I don't get the tag which should be reported by the startElement function. Here is the code :

void XMLIOHandler::startElement(const   XMLCh* const    uri,
		const   XMLCh* const    localname,
		const   XMLCh* const    qname,
		const   Attributes&     attrs) {
	char *element_ptr = NULL;

	element_ptr = XMLString::transcode(localname);
	first_element = element_ptr;
        cerr << first_element << endl;
	XMLString::release(&element_ptr);
}

it always display an empty string. I really don't know how to solve this. I am doing something wrong ?
Best regards,
JM

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] [Commented] (XERCESC-1985) I get empty strings from the startElements

Posted by "Jean-Michel Richer (JIRA)" <xe...@xml.apache.org>.
    [ https://issues.apache.org/jira/browse/XERCESC-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13288445#comment-13288445 ] 

Jean-Michel Richer commented on XERCESC-1985:
---------------------------------------------

Indeed, you are right ! I forgot to check that ! Thank you very much for your help

                
> I get empty strings from the startElements
> ------------------------------------------
>
>                 Key: XERCESC-1985
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1985
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 3.1.1
>         Environment: Linux Ubuntu 12.04
>            Reporter: Jean-Michel Richer
>            Priority: Minor
>
> I have installed xerces 3.1.1 and xalan 1.11. I have developped a simple Handler (inherited from DefaultHandler) but when I parse an xml file I don't get the tag which should be reported by the startElement function. Here is the code :
> void XMLIOHandler::startElement(const   XMLCh* const    uri,
> 		const   XMLCh* const    localname,
> 		const   XMLCh* const    qname,
> 		const   Attributes&     attrs) {
> 	char *element_ptr = NULL;
> 	element_ptr = XMLString::transcode(localname);
> 	first_element = element_ptr;
>         cerr << first_element << endl;
> 	XMLString::release(&element_ptr);
> }
> it always display an empty string. I really don't know how to solve this. I am doing something wrong ?
> Best regards,
> JM

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] [Closed] (XERCESC-1985) I get empty strings from the startElements

Posted by "Jean-Michel Richer (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jean-Michel Richer closed XERCESC-1985.
---------------------------------------


thank you for your help
                
> I get empty strings from the startElements
> ------------------------------------------
>
>                 Key: XERCESC-1985
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1985
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 3.1.1
>         Environment: Linux Ubuntu 12.04
>            Reporter: Jean-Michel Richer
>            Priority: Minor
>
> I have installed xerces 3.1.1 and xalan 1.11. I have developped a simple Handler (inherited from DefaultHandler) but when I parse an xml file I don't get the tag which should be reported by the startElement function. Here is the code :
> void XMLIOHandler::startElement(const   XMLCh* const    uri,
> 		const   XMLCh* const    localname,
> 		const   XMLCh* const    qname,
> 		const   Attributes&     attrs) {
> 	char *element_ptr = NULL;
> 	element_ptr = XMLString::transcode(localname);
> 	first_element = element_ptr;
>         cerr << first_element << endl;
> 	XMLString::release(&element_ptr);
> }
> it always display an empty string. I really don't know how to solve this. I am doing something wrong ?
> Best regards,
> JM

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org


[jira] [Resolved] (XERCESC-1985) I get empty strings from the startElements

Posted by "Alberto Massari (JIRA)" <xe...@xml.apache.org>.
     [ https://issues.apache.org/jira/browse/XERCESC-1985?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alberto Massari resolved XERCESC-1985.
--------------------------------------

    Resolution: Invalid

In the startElement call, you get data either in the pair uri+localname, or in the qname variable. If localname is always empty, it means you didn't turn on namespace processing and you should look to the qname
                
> I get empty strings from the startElements
> ------------------------------------------
>
>                 Key: XERCESC-1985
>                 URL: https://issues.apache.org/jira/browse/XERCESC-1985
>             Project: Xerces-C++
>          Issue Type: Bug
>          Components: Validating Parser (XML Schema)
>    Affects Versions: 3.1.1
>         Environment: Linux Ubuntu 12.04
>            Reporter: Jean-Michel Richer
>            Priority: Minor
>
> I have installed xerces 3.1.1 and xalan 1.11. I have developped a simple Handler (inherited from DefaultHandler) but when I parse an xml file I don't get the tag which should be reported by the startElement function. Here is the code :
> void XMLIOHandler::startElement(const   XMLCh* const    uri,
> 		const   XMLCh* const    localname,
> 		const   XMLCh* const    qname,
> 		const   Attributes&     attrs) {
> 	char *element_ptr = NULL;
> 	element_ptr = XMLString::transcode(localname);
> 	first_element = element_ptr;
>         cerr << first_element << endl;
> 	XMLString::release(&element_ptr);
> }
> it always display an empty string. I really don't know how to solve this. I am doing something wrong ?
> Best regards,
> JM

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators: https://issues.apache.org/jira/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

---------------------------------------------------------------------
To unsubscribe, e-mail: c-dev-unsubscribe@xerces.apache.org
For additional commands, e-mail: c-dev-help@xerces.apache.org