Hi Guys, I used xmlReadFile operation to parser a xml file responded from microsoft analsys sevices, the file contains both DTD(format defination) & data content. But I find xmlReadFile can not successfully identify the DTD content within the XML file.
Your idea is very appreciated! Thanks :) PS: XML file & my code. 1. The XML file: <?xml version="1.0"?> <SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/" SOAP-ENV:encodingStyle="http://schemas.xmlsoap.org/soap/encoding/"> <SOAP-ENV:Body> <m:DiscoverResponse xmlns:m="urn:schemas-microsoft-com:xml-analysis"> <m:return xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema"> <root xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:EX="urn:schemas-microsoft-com:xml-analysis:exception"> <xsd:schema xmlns="urn:schemas-microsoft-com:xml-analysis:rowset" targetNamespace="urn:schemas-microsoft-com:xml-analysis:rowset" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd=" http://www.w3.org/2001/XMLSchema" xmlns:sql="urn:schemas-microsoft-com:xml-sql" elementFormDefault="qualified"> <xsd:element name="root"> <xsd:complexType> <xsd:sequence> <xsd:element name="row" type="row" minOccurs="0" maxOccurs="unbounded"/> </xsd:sequence> </xsd:complexType> </xsd:element> <xsd:simpleType name="uuid"> <xsd:restriction base="xsd:string"> <xsd:pattern value="[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}"/> </xsd:restriction> </xsd:simpleType> <xsd:complexType name="row"> <xsd:sequence> <xsd:element name="DataSourceName" type="xsd:string" sql:field="DataSourceName" minOccurs="0"/> <xsd:element name="DataSourceDescription" type="xsd:string" sql:field="DataSourceDescription" minOccurs="0"/> <xsd:element name="URL" type="xsd:string" sql:field="URL" minOccurs="0"/> <xsd:element name="DataSourceInfo" type="xsd:string" sql:field="DataSourceInfo" minOccurs="0"/> <xsd:element name="ProviderName" type="xsd:string" sql:field="ProviderName" minOccurs="0"/> <xsd:element name="ProviderType" type="xsd:string" sql:field="ProviderType" minOccurs="0" maxOccurs="unbounded"/> <xsd:element name="AuthenticationMode" type="xsd:string" sql:field="AuthenticationMode" minOccurs="0"/> </xsd:sequence> </xsd:complexType> </xsd:schema> <row> <DataSourceName>Local Analysis Server</DataSourceName> <DataSourceDescription>Microsoft Analysis Server 2000 on local machine</DataSourceDescription> <URL>http://localhost/xmla/msxisapi.dll</URL> <DataSourceInfo>Local Analysis Server</DataSourceInfo> <ProviderName>Microsoft XML for Analysis</ProviderName> <ProviderType>TDP</ProviderType> <ProviderType>MDP</ProviderType> <ProviderType>DMP</ProviderType> <AuthenticationMode>Unauthenticated</AuthenticationMode> </row> </root> </m:return> </m:DiscoverResponse> </SOAP-ENV:Body> </SOAP-ENV:Envelope> 2. my code: doc = xmlReadFile("out.xml", NULL, 0);
_______________________________________________ xml mailing list, project page http://xmlsoft.org/ [email protected] http://mail.gnome.org/mailman/listinfo/xml
