Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
I'm a complete idiot about this topic
Message
From
16/06/2009 15:46:45
 
 
To
16/06/2009 12:46:37
General information
Forum:
Visual FoxPro
Category:
XML, XSD
Miscellaneous
Thread ID:
01406387
Message ID:
01406453
Views:
95
ok, using the minimal code from their examples
LOCAL oxml as XMLAdapter
oxml = NEWOBJECT("xmladapter")
oxml.LoadXML("c:\cmbhs\cmbhsadultuniformassessment.xml")
?oXMLAdapter.Tables.Item(1).Fields.Item(1).DataType
It still fails on the "c:references tag"


>Dorris,
>
>(1) I have added 3 lines at the bottom - so that it can be loaded
>(2) I have changed utf-16 into utf-8 (utf-16 = two bytes per char which does not work well for cut and paste I believe)
>
>(3) this is a schema. Do you have to generate an xml file that matches that schema ?
>If yes - try the xmladapter (which has its limits) (forget xmltocursor)
>
>(4) Also useful is to download xml notepad from microsoft http://www.microsoft.com/downloads/details.aspx?familyid=72d6aa49-787d-4118-ba5f-4f30fe913628&displaylang=en
>
>(5) Yes, it's a bit of another world you have to get used to
>
>(6) Post any questions you have - take it one step at a time
>
>
><?xml version="1.0" encoding="utf-8"?>
><xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:c="http://CMBHSSchemas.MHCenter.CareDecodeTables" 
>
>xmlns="http://CMBHSSchemas.MHCenter.CMBHSAdultUniformAssessment" 
>
>targetNamespace="http://CMBHSSchemas.MHCenter.CMBHSAdultUniformAssessment" xmlns:xs="http://www.w3.org/2001/XMLSchema">
>  <xs:import schemaLocation="CareDecodeTables.xsd" namespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>  <xs:annotation>
>    <xs:appinfo>
>      <c:references xmlns:c="http://CMBHSSchemas.MHCenter.CareDecodeTables">
>        <c:reference targetNamespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>      </c:references>
>      <b:references>
>        <b:reference targetNamespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>      </b:references>
>    </xs:appinfo>
>  </xs:annotation>
>  <xs:complexType name="AdultUniformAssessment">
>    <xs:sequence>
>      <xs:element minOccurs="1" name="COMP">
>        <xs:annotation>
>          <xs:documentation>
>            Component Code.  Must equal your component code
>          </xs:documentation>
>        </xs:annotation>
>        <xs:simpleType>
>          <xs:restriction base="xs:string" />
>        </xs:simpleType>
>      </xs:element>
>      <xs:element minOccurs="1" default="1" name="REC_TYPE">
>        <xs:annotation>
>          <xs:documentation>
>            Record Type. Transaction data record Must equal '1'
>          </xs:documentation>
>        </xs:annotation>
>        <xs:simpleType>
>          <xs:restriction base="xs:int">
>            <xs:pattern value="[1]" />
>          </xs:restriction>
>        </xs:simpleType>
>      </xs:element>
>      <xs:element minOccurs="1" default="28" name="TRANS">
>        <xs:annotation>
>          <xs:documentation>
>            Transaction Code. Batch data transaction Must equal '28'
>          </xs:documentation>
>        </xs:annotation>
>        <xs:simpleType>
>          <xs:restriction base="xs:int">
>            <xs:pattern value="[2][8]" />
>          </xs:restriction>
>        </xs:simpleType>
>      </xs:element>
>    </xs:sequence>
>   </xs:complexType>
></xs:schema>
>
>
>>Hello all
>>
>>Stepping off into the wonderful world of XML for an EDI project and I admit - it's a BIG brick wall that I have to get over to get to that green and happy land and I'm having problems finding the footholes to even begin the climb.
>>
>>Below is an example of what I'm dealing with. I'm trying to start with the simplest stuff - xmltocursor - but I'm either ending up with 2 fields "Complextype" and "Restriction" or it's horking (as on the example below) on the "c:references" tag
>>
>>Any help would be appreciated, examples would be good - I do well with the "Monkey see, Monkey do 'til Monkey understand" thing
>>
>>
>>
>><?xml version="1.0" encoding="utf-16"?>
>><xs:schema xmlns:b="http://schemas.microsoft.com/BizTalk/2003" xmlns:c="http://CMBHSSchemas.MHCenter.CareDecodeTables" xmlns="http://CMBHSSchemas.MHCenter.CMBHSAdultUniformAssessment" targetNamespace="http://CMBHSSchemas.MHCenter.CMBHSAdultUniformAssessment" xmlns:xs="http://www.w3.org/2001/XMLSchema">
>>  <xs:import schemaLocation="CareDecodeTables.xsd" namespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>>  <xs:annotation>
>>    <xs:appinfo>
>>      <c:references xmlns:c="http://CMBHSSchemas.MHCenter.CareDecodeTables">
>>        <c:reference targetNamespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>>      </c:references>
>>      <b:references>
>>        <b:reference targetNamespace="http://CMBHSSchemas.MHCenter.CareDecodeTables" />
>>      </b:references>
>>    </xs:appinfo>
>>  </xs:annotation>
>>  <xs:complexType name="AdultUniformAssessment">
>>    <xs:sequence>
>>      <xs:element minOccurs="1" name="COMP">
>>        <xs:annotation>
>>          <xs:documentation>
>>            Component Code.  Must equal your component code
>>          </xs:documentation>
>>        </xs:annotation>
>>        <xs:simpleType>
>>          <xs:restriction base="xs:string" />
>>        </xs:simpleType>
>>      </xs:element>
>>      <xs:element minOccurs="1" default="1" name="REC_TYPE">
>>        <xs:annotation>
>>          <xs:documentation>
>>            Record Type. Transaction data record Must equal '1'
>>          </xs:documentation>
>>        </xs:annotation>
>>        <xs:simpleType>
>>          <xs:restriction base="xs:int">
>>            <xs:pattern value="[1]" />
>>          </xs:restriction>
>>        </xs:simpleType>
>>      </xs:element>
>>      <xs:element minOccurs="1" default="28" name="TRANS">
>>        <xs:annotation>
>>          <xs:documentation>
>>            Transaction Code. Batch data transaction Must equal '28'
>>          </xs:documentation>
>>        </xs:annotation>
>>        <xs:simpleType>
>>          <xs:restriction base="xs:int">
>>            <xs:pattern value="[2][8]" />
>>          </xs:restriction>
>>        </xs:simpleType>
>>      </xs:element>
>>
"You don't manage people. You manage things - people you lead" Adm. Grace Hopper
Pflugerville, between a Rock and a Weird Place
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform