Click here to Skip to main content
15,907,395 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
Hi,

I have an XSD file and the data types of an element may involve a namespace defined in an another XSD file.

I want the element name and the datatype of it in an excel file. The namespace defining the data type in other file should also be resolved to show the primitive data type (defined in the namespace) in an excel



<xs:complexType name="DBStatusType">
        <xs:sequence>
            <xs:element ref="DB:Version"/>
            <xs:element ref="DB:State"/>
            <xs:element ref="DB:StateReasons" minOccurs="0"/>
            <xs:element name="DBState1" type="DbStatus:DBStateType" minOccurs="0"/>
            <xs:element name="Session" minOccurs="0">
                <xs:complexType>
                    <xs:sequence>
                        <xs:element name="SessionInfo" type="DBSession:DBSessionInfoType" maxOccurs="unbounded"/>
                    </xs:sequence>
                </xs:complexType>
            </xs:element>
        </xs:sequence>
    </xs:complexType>


Here DBStatus and DBSessions are namespaces. They refer to a different XSD file.
I want the expansion of this datatype when the DBState1 & SessionInfo will be logged in the excel file

Do we have any tool for the same. I am new to the XML stuff

Thanks,
SL
Posted

1 solution

I recommend this article by Marc Clifton.

But he has many other XML interrogation articles that I have yet to look at which could be closer to your needs, but this one will show you how to capture the XSD for starters
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900