I want to obtain a list of all the xs:complexType @names in the xs:schema that defines a namespace called Common. Here is a snippet of the WSDL I am trying to parse with xmltask. It contains multiple schemas, but only the first is shown: <?xml version="1.0" encoding="UTF-8"?> <wsdl:definitions xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:ns0="http:asdf/Dictionary" xmlns:ns1="http:asdf/Common" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/" xmlns:tns="http://www.example.com/Services2/" name="DictionaryService" targetNamespace="http://www.example.com/Services2/"> <wsdl:types> <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:Common="http:asdf/Common" xmlns:ds="http:asdf/Dictionary" attributeFormDefault="unqualified" elementFormDefault="qualified" targetNamespace="http:asdf/Dictionary"> <xs:import namespace="http:asdf/Common"/> <xs:complexType name="AccountSettingsType"> <xs:sequence> <xs:element minOccurs="0" ref="ds:UserInfo"/> <xs:element minOccurs="0" ref="ds:Language"/> <xs:element minOccurs="0" ref="ds:DateFormat"/> <xs:sequence> </xs:complexType> ... </xs:schema </wsdl:types> </wsdl:definitions>
1) Using a suggestion posted by Brian Agnew a couple of years back, I can get the first schema with this: //*[local-name()='schema'][1] It would be much better if I could select the schema that defines the Common namespace (shown above.) Simply grabbing the first schema is asking for trouble. 2) This does not return anything: //*[local-name()='schema'][1]/*[local-name()='complexType'] What is the magic incantation? Thanks, Mike ------------------------------------------------------------------------------ _______________________________________________ Xmltask-users mailing list Xmltask-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/xmltask-users