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 Martin Brandl <sh...@gmx.de> on 2010/12/28 15:02:53 UTC

Howto retrieve schema element Information?

Hello,

I want to get schema information for a specific element. For example: 

If I have the following "wsdl:part" node, how can I determine that the element 
is from type "s:string" with minOccurs = 0 and maxOccurs = 1?
 

....

  <s:schema elementFormDefault="qualified" 
targetNamespace="http://www.Nanonull.com/TimeService/">
      <s:element name="getUTCTimeResponse">
        <s:complexType>
          <s:sequence>
            <s:element minOccurs="0" maxOccurs="1" name="getUTCTimeResult" 
type="s:string" />
          </s:sequence>
        </s:complexType>
      </s:element>

....

  <wsdl:message name="getUTCTimeSoapOut">
    <wsdl:part name="parameters" element="tns:getUTCTimeResponse" />
  </wsdl:message>

....


This example is from "www.nanonull.com/TimeService/TimeService.asmx?wsdl".
I am using C Xerces DOMParser 2.8.

I tryed something like this: 

....

DOMNode* myNode = pcMap->item(i);
const XMLCh* pstrNodeValue = myNode->getNodeValue(); // tns:getUTCTimeResponse
const XMLCh* pstrNodeName = myNode->getNodeName(); // element

DOMAttr* cDOMAttribute = (DOMAttr*) myNode;
const DOMTypeInfo * typeInfo = cDOMAttribute->getTypeInfo();

Any suggestions?

Martin Brandl
 



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