XML to XSD

hello
if I get an XML (as a file), and I would like to map it to an RFC, I know I can do it with Java/ABAP mapping or XSLT. my Q is if it is possible to get the XML, build a suitable XSD Schema and put it in the Message Mapping source and the XSD will know how to get the XML and convert it in to object?
Thanks
Kfir

>
kfir goldwasser wrote:
> Thanks for the information.
> but still, I know that the XSD will be in the MT will check that the XML us Valid.
> in the Message Mapping I will use the MT to do a graphical mapping to the RFC?
It will work if you use it the way you have mentioned.

Similar Messages

  • Getting error while converting xml to xsd

    I am getting error"The table (citeinfo) cannot be the child table to itself in nested relations"
    at "http://www.flame-ware.com/products/xml-2-xsd/Default.aspx", while converting
    xml into xsd so i can register.
    Wherever citeinfo is there it is giving error.
    Please look at bold and suggest solution
    thank you
    <?xml version="1.0" encoding="ISO-8859-1"?>
    <!DOCTYPE metadata SYSTEM "http://www.fgdc.gov/metadata/fgdc-std-001-1998.dtd">
    <metadata>
    <idinfo>
    <citation>
    *<citeinfo>(1)*<origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>One</sername>
    <issue>One</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    <lworkcit>
    *<citeinfo>(2)*<pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>One</sername>
    <issue>One</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    *</citeinfo>(2)*</lworkcit>
    *</citeinfo>(1)*</citation>
    <descript>
    <abstract>Easement</abstract>
    <purpose>E911 System</purpose>
    <supplinf>None</supplinf>
    </descript>
    <timeperd>
    <timeinfo>
    <sngdate>
    <caldate>20040512</caldate>
    <time>09000000</time>
    </sngdate>
    </timeinfo>
    <current>publication date</current>
    </timeperd>
    <status>
    <progress>Complete</progress>
    <update>As needed</update>
    </status>
    <spdom>
    <bounding>
    <westbc>
    -122.339</westbc>
    <eastbc>
    -121.0716</eastbc>
    <northbc>
    37.4900</northbc>
    <southbc>
    36.9086</southbc>
    </bounding>
    </spdom>
    <keywords>
    <theme>
    <themekt>Easement</themekt>
    <themekey>Easement</themekey>
    </theme>
    <place>
    <placekt>San Jose</placekt>
    <placekey>San Jose</placekey>
    </place>
    <stratum>
    <stratkt>None</stratkt>
    <stratkey>None</stratkey>
    </stratum>
    <temporal>
    <tempkt>None</tempkt>
    <tempkey>None</tempkey>
    </temporal>
    </keywords>
    <accconst>None</accconst>
    <useconst>None</useconst>
    <ptcontac>
    <cntinfo>
    <cntperp>
    <cntper>Earl Harris</cntper>
    <cntorg>City of San Jose</cntorg>
    </cntperp>
    <cntpos>Project Manager</cntpos>
    <cntaddr>
    <addrtype>Actual Address</addrtype>
    <address>801 N 1 ST</address>
    <city>San Jose</city>
    <state>CA</state>
    <postal>90000</postal>
    <country>USA</country>
    </cntaddr>
    <cntvoice>408.277.5626</cntvoice>
    <cnttdd>408.277.5626</cnttdd>
    <cntfax>408.298.8382</cntfax>
    <cntemail>[email protected]</cntemail>
    <hours>9-5</hours>
    <cntinst>None</cntinst>
    </cntinfo>
    </ptcontac>
    <browse>
    <browsen>None</browsen>
    <browsed>None</browsed>
    <browset>None</browset>
    </browse>
    <datacred>Unknown</datacred>
    <secinfo>
    <secsys>FGDC</secsys>
    <secclass>Confidential</secclass>
    <sechandl>Confidential Information</sechandl>
    </secinfo>
    <native>Microsoft Windows NT Version 4.0 (Build 1381) Service Pack 6; ESRI ArcCatalog 8.3.0.800</native>
    <crossref>
    *<citeinfo>(3)*<origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>one</sername>
    <issue>one</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    <lworkcit>
    *<citeinfo>(*4)
    <origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>one</sername>
    <issue>one</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    *</citeinfo>(*3)
    </lworkcit>
    *</citeinfo*>(4)
    </crossref>
    </idinfo>
    <dataqual>
    <attracc>
    <attraccr>All the related attributes are populated 100%.</attraccr>
    <qattracc>
    <attraccv>100%</attraccv>
    <attracce>All the related attributes are populated 100%.</attracce>
    </qattracc>
    </attracc>
    <logic>100% adjusted,modified and captured easements.</logic>
    <complete>100%</complete>
    <posacc>
    <horizpa>
    <horizpar>Easement accuracy is 2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</horizpar>
    <qhorizpa>
    <horizpav>2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</horizpav>
    <horizpae>Easement accuracy is 2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</horizpae>
    </qhorizpa>
    </horizpa>
    <vertacc>
    <vertaccr>Easement accuracy is 2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</vertaccr>
    <qvertpa>
    <vertaccv>2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</vertaccv>
    <vertacce>Easement accuracy is 2 ft for 3" pixel Orthophoto, 5 ft for 9" pixel Orthophoto.</vertacce>
    </qvertpa>
    </vertacc>
    </posacc>
    <lineage>
    <srcinfo>
    <srccite>
    <*citeinfo>(5)*<origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>one</sername>
    <issue>one</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    <lworkcit>
    *</citeinfo>(5*)*<citeinfo>(6)*
    <origin>MRF</origin>
    <pubdate>20040512</pubdate>
    <pubtime>09000000</pubtime>
    <title>BAS_EASEMENT</title>
    <edition>1</edition>
    <geoform>vector digital data</geoform>
    <serinfo>
    <sername>one</sername>
    <issue>one</issue>
    </serinfo>
    <pubinfo>
    <pubplace>San Jose</pubplace>
    <publish>CITY</publish>
    </pubinfo>
    <othercit>None</othercit>
    <onlink>www.mrf.com</onlink>
    *</citeinfo>(5)*
    </lworkcit>
    *</citeinfo>(6)*
    </srccite>
    <srcscale>24000</srcscale>
    <typesrc>FTP</typesrc>
    <srctime>
    <timeinfo>
    <sngdate>
    <caldate>20040512</caldate>
    <time>09000000</time>
    </sngdate>
    </timeinfo>
    <srccurr>publication date</srccurr>
    </srctime>
    <srccitea>Unknown</srccitea>
    <srccontr>MGE dgn contains easement data.</srccontr>
    </srcinfo>
    <procstep>
    <procdesc>Easement data is reprojected from NAD27 to NAD83.
    Further it is adjusted as per the spatial alignment shown in MGE input dgn.</procdesc>
    <srcused>Easement</srcused>
    <procdate>20040512</procdate>
    <proctime>09000000</proctime>
    <srcprod>BAS_EASEMENT</srcprod>
    <proccont>
    <cntinfo>
    <cntperp>
    <cntper>Mahesh P Choudhury</cntper>
    <cntorg>Rolta International Inc.</cntorg>
    </cntperp>
    <cntpos>Project Manager</cntpos>
    <cntaddr>
    <addrtype>mailing address</addrtype>
    <address>5865 North Point Parkway</address>
    <city>Alpharetta</city>
    <state>GA</state>
    <postal>30022</postal>
    <country>USA</country>
    </cntaddr>
    <cntvoice>678.942.5015</cntvoice>
    <cnttdd>678.942.5015</cnttdd>
    <cntfax>678.942.5001</cntfax>
    <cntemail>[email protected]</cntemail>
    <hours>8-5</hours>
    <cntinst>None</cntinst>
    </cntinfo>
    </proccont>
    </procstep>
    </lineage>
    <cloud>Unknown</cloud>
    </dataqual>
    <spdoinfo>
    <indspref>unknown</indspref>
    <direct>Vector</direct>
    <ptvctinf>
    <sdtsterm>
    <sdtstype>String</sdtstype>
    <ptvctcnt>2203</ptvctcnt>
    </sdtsterm>
    </ptvctinf>
    </spdoinfo>
    <spref>
    <horizsys>
    <geograph>
    <latres>5.5</latres>
    <longres>5.5</longres>
    <geogunit>Decimal degrees</geogunit>
    </geograph>
    <geodetic>
    <horizdn>North American Datum of 1983</horizdn>
    <ellips>Geodetic Reference System 80</ellips>
    <semiaxis>1</semiaxis>
    <denflat>2</denflat>
    </geodetic>
    </horizsys>
    <vertdef>
    <altsys>
    <altdatum>North American Vertical Datum of 1988</altdatum>
    <altres>0.002</altres>
    <altunits>sf</altunits>
    <altenc>Attribute values</altenc>
    </altsys>
    <depthsys>
    </depthsys>
    </vertdef>
    </spref>
    <eainfo>
    <detailed>
    <enttyp>
    <enttypl>
    BAS_EASEMENT</enttypl>
    <enttypd>Contains geometry and attributes for easement segments</enttypd>
    <enttypds>Data Model Dictionary</enttypds>
    </enttyp>
    <attr>
    <attrlabl>BAS_EASEMENT_ID</attrlabl>
    <attrdef>Migrated from STREET table ID column. After all the existing IDs have been migrated, assign ID #70,001 onwards for the new easement (or what ever # is available sequentially using, street centerline #) ID's.</attrdef>
    <attrdefs>ESRI</attrdefs>
    <attrdomv>
    <udom>Sequential unique whole numbers that are automatically generated.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>SURVEY_LENGTH</attrlabl>
    <attrdef>Actual length of easement (international foot).This DOES take into account the State Plane Coordinate System.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Surveyed segment length</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>ROW_WIDTH</attrlabl>
    <attrdef>Width of right-of-way (international feet)</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Right-of-way width</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Updated from ROW files</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>FROM_EASEMENT_ID</attrlabl>
    <attrdef>Self-referential key to BAS_EASEMENT table, that contains locational information about the easement that the easement is digitized from. "FROM" is the starting point of digitization</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>IDs of an easement to which FROM side of this easement is connected.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>FROM_STREET_ID</attrlabl>
    <attrdef>Foreign key to BAS_STREET_SEGMENT table, that contains locational information about street segment that the easement is digitized from. "FROM" is the starting point of digitization</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>IDs of an street segment to which FROM side of this easement is connected.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>TO_EASEMENT_ID</attrlabl>
    <attrdef>Self-referential key to BAS_EASEMENT table, that contains locational information about the easement that the easement is digitized to. "TO" is the ending point of digitization.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>IDs of an easement to which TO side of this easement is closely located.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>TO_STREET_ID</attrlabl>
    <attrdef>Foreign key to BAS_STREET_SEGMENT table, that contains locational information about street segment that the easement is digitized to. "TO" is the ending point of digitization.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>IDs of an street segment to which TO side of this easement is closely located.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>OTH_PROCESSING_STATUS_ID</attrlabl>
    <attrdef>ID of the status/result of last run batch job.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Migrated from PLAN_1 in MGE tables and GIS_TRACKING.MDB Access Database</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>MUNICIPALITY_NAME</attrlabl>
    <attrdef>Name of municipality in which the easement primarily resides.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <codesetd>
    <codesetn>MUNICIPALITY_NAME_DOMAIN</codesetn>
    <codesets>Data Model Dictionary</codesets>
    </codesetd>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Updated using Municipal boundary source data.</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>RECORD_DRAWING_FLAG</attrlabl>
    <attrdef>Engineering plan that has been accepted by the City of San Jose (Y or N).</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>USERNAME who last modified this record</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Updated using source data.</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>ACQUISITION_DATE</attrlabl>
    <attrdef>Official date engineering plan accepted by the City of San Jose on this date</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Date/Time stamp of last record modification</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Updated using source data.</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>GEO_MOD_DATE</attrlabl>
    <attrdef>Time stamp when GEOMETRY column was last modified.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Time stamp when GEOMETRY column was last modified.</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Data modified date.</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>GDO_GEOMETRY</attrlabl>
    <attrdef>Contains spatial data with true arc geometry.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Oracle Spatial Geometry Data - True Arcs</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>MAN_OVERRIDE</attrlabl>
    <attrdef>This flag is 'N' by default. If this flag is set to 'Y' no unattended batch process will touch it ever again.</attrdef>
    <attrdefs>Data Model Dictionary</attrdefs>
    <attrdomv>
    <udom>Flag set for batch process</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>MESSAGE</attrlabl>
    <attrdef>Message from automated batch process to operator; can be "OK", or error message, or "to be checked", etc.</attrdef>
    <attrdefs>data model dictionary</attrdefs>
    <attrdomv>
    <udom>GDO_GEOMETRY.LEN</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>OTH_PLAN_CREATED</attrlabl>
    <attrdef>PLAN_1 in STREET table should be migrated to BAS_EASEMENT table OTH_PLAN_ID_CREATED column. This value should also be entered into the OTH_PLAN table PLAN_NAME column if not present.</attrdef>
    <attrdefs>Data Dictionary</attrdefs>
    <attrdomv>
    <codesetd>
    <codesetn>OTH_PLAN_DOMAIN</codesetn>
    <codesets>data model dictionary</codesets>
    </codesetd>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>OTH_PLAN_MODIFIED</attrlabl>
    <attrdef>PLAN_2 in STREET table should be migrated to BAS_EASEMENT table OTH_PLAN_ID_MODIFIED column. This value should also be entered into the OTH_PLAN table PLAN_NAME column if not present</attrdef>
    <attrdefs>Data dictionary</attrdefs>
    <attrdomv>
    <codesetd>
    <codesetn>OTH_PLAN_DOMAIN</codesetn>
    <codesets>data model dictionary</codesets>
    </codesetd>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>LINEAGE_ID</attrlabl>
    <attrdef>Artificial Numeric Identifier; Assigned to any graphical object; Unique throughout the system. Shared among tables. This column would also be used by EDL Administrator for lineage.</attrdef>
    <attrdefs>Data dictionary</attrdefs>
    <attrdomv>
    <udom>Artificial Numeric Identifier</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    <attr>
    <attrlabl>GDO_GEOMETRY.LEN</attrlabl>
    <attrdef>Created default</attrdef>
    <attrdefs>Data model</attrdefs>
    <attrdomv>
    <udom>unknown</udom>
    </attrdomv>
    <begdatea>20040512</begdatea>
    <enddatea>20040512</enddatea>
    <attrvai>
    <attrva>100</attrva>
    <attrvae>Unknown</attrvae>
    </attrvai>
    <attrmfrq>As needed</attrmfrq>
    </attr>
    </detailed>
    <overview>
    <eaover>Populated using MRF Tools</eaover>
    <eadetcit>Various sources</eadetcit>
    </overview>
    </eainfo>
    <distinfo>
    <distrib>
    <cntinfo>
    <cntperp>
    <cntper>Earl Harris</cntper>
    <cntorg>City of San Jose</cntorg>
    </cntperp>
    <cntpos>Project Manager</cntpos>
    <cntaddr>
    <addrtype>Actual Address</addrtype>
    <address>801 N 1 ST</address>
    <city>San Jose</city>
    <state>CA</state>
    <postal>90000</postal>
    <country>USA</country>
    </cntaddr>
    <cntvoice>408.277.5626</cntvoice>
    <cnttdd>408.277.5626</cnttdd>
    <cntfax>408.298.8382</cntfax>
    <cntemail>[email protected]</cntemail>
    <hours>9-5</hours>
    <cntinst>None</cntinst>
    </cntinfo>
    </distrib>
    <resdesc>Unknown</resdesc>
    <distliab>Unknown</distliab>
    <stdorder>
    <digform>
    <digtinfo>
    <formname>GM Pro Access</formname>
    <formvern>5.1</formvern>
    <formspec>GM Pro 5.1</formspec>
    <formcont>Easement data</formcont>
    <filedec>no compression applied</filedec>
    <transize>60</transize>
    </digtinfo>
    <digtopt>
    <onlinopt>
    <computer>
    <networka>
    <networkr>FTP</networkr>
    </networka>
    </computer>
    <accinstr>FTP</accinstr>
    <oncomp>FTP server</oncomp>
    </onlinopt>
    <offoptn>
    <offmedia>None</offmedia>
    <reccap>
    <recden>1</recden>
    <recdenu>None</recdenu>
    </reccap>
    <recfmt>None</recfmt>
    <compat>None</compat>
    </offoptn>
    </digtopt>
    </digform>
    <fees>Unknown</fees>
    <ordering>Unknown</ordering>
    <turnarnd>Unknown</turnarnd>
    </stdorder>
    <custom>Unknown</custom>
    <techpreq>Unknown</techpreq>
    <availabl>
    <timeinfo>
    <sngdate>
    <caldate>20040512</caldate>
    <time>09000000</time>
    </sngdate>
    </timeinfo>
    </availabl>
    </distinfo>
    <metainfo>
    <metd>20040512</metd>
    <metrd>20040512</metrd>
    <metfrd>20040519</metfrd>
    <metc>
    <cntinfo>
    <cntperp>
    <cntper>Mahesh P Choudhury</cntper>
    <cntorg>Rolta International Inc</cntorg>
    </cntperp>
    <cntpos>Project Manager</cntpos>
    <cntaddr>
    <addrtype>mailing address</addrtype>
    <address>5865 North Point Parkway</address>
    <city>Alpharetta</city>
    <state>GA</state>
    <postal>30022</postal>
    <country>USA</country>
    </cntaddr>
    <cntvoice>678.942.5015</cntvoice>
    <cnttdd>678.942.5015</cnttdd>
    <cntfax>678.942.5001</cntfax>
    <cntemail>[email protected]</cntemail>
    <hours>8-5</hours>
    <cntinst>None</cntinst>
    </cntinfo>
    </metc>
    <metstdn>FGDC Content Standards for Digital Geospatial Metadata</metstdn>
    <metstdv>FGDC-STD-001-1998</metstdv>
    <mettc>local time</mettc>
    <metac>Unknown</metac>
    <metuc>Unknown</metuc>
    <metsi>
    <metscs>Unknown</metscs>
    <metsc>Confidential</metsc>
    <metshd>Unknown</metshd>
    </metsi>
    <metextns>
    <onlink>http://www.esri.com/metadata/esriprof80.html</onlink>
    <metprof>ESRI Metadata Profile</metprof>
    </metextns>
    </metainfo>
    </metadata>

    I am having error while registering as undefined element for citeinfo, timeinfo and cntinfo as shown below
    Please could you help me solve.
    thanks
    </xs:appinfo>
              </xs:annotation>
    </xs:element>     
    <xs:complexType name="citationType">          
    <xs:sequence>               
    *<xs:element ref="citeinfo"/>*          
    </xs:sequence>     
    </xs:complexType>
    SQL> BEGIN
    2 DBMS_XMLSCHEMA.registerSchema(
    3 SCHEMAURL => 'fgdc-std-001-1998-sect011.xsd',
    4 SCHEMADOC => bfilename('XMLDIR','fgdc-std-001-1998-sect011.xsd'),
    5 CSID => nls_charset_id('UTF8'));
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00021: undefined element "citeinfo"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 37
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 61
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 126
    ORA-06512: at line 2
    </xs:appinfo>          
    </xs:annotation>     
    </xs:element>     
    <xs:complexType name="timeperdType">          
    <xs:sequence>               
    *<xs:element ref="timeinfo"/>     *          
    <xs:element ref="current"/>          
    </xs:sequence>     
    </xs:complexType>     
    <xs:element name="current" type="currentType">
    </xs:appinfo>          
    </xs:annotation>     
    </xs:element>     
    <xs:complexType name="ptcontacType">          
    <xs:sequence>               
    *<xs:element ref="cntinfo"/>     *
    </xs:sequence>
         </xs:complexType>     
    <xs:element name="browse" type="browseType">          
    <xs:annotation>

  • XML and XSD file to an internal table

    I had read a lot of thread  but i don't understand how to deal with xml/xsd in R3.
    I need someone that have a definite example for this escenary please.
    With OPEN DATASET took from the server XML and XSD file, and put it in two internal tables type string.
    What functions or method have to use, and how to use them, to charge the XML file in an internal table?
    This is an example of XML and XDS:
    XML
    AND CONTINUE
    Best Regards,

    I just tried to interpret your question, it was not obvious what you wanted.
    I guess what you mean is that you have defined (statically) a deep structure, and you want to decode the XML into it. That is called a transformation (transaction STRANS, statement CALL TRANSFORMATION). You have the choice between 2 transformation languages: XSLT and ST. Of course, it depends what release you are running.
    I advise you to play first with the ID transformation, to convert an ABAP deep structured data object into XML, so that you see what XML is generated, this one is called asXML. If you create your own transformation, when you call it, it will first convert automatically the data object to asXML, and the transformation has to do the rest of the job.
    You can do the opposite, i.e. converting from XML to a data object, according to the same principle (intermediate asXML).
    Well, there are lots of things to say, I recommend you to read articles and documentation on XSLT and ST (search on SDN).
    About XSD, it won't help (and I did never see any possibility to use it) to decode the XML, as you must anyway define the target data object statically (and there's no tool to generate the ABAP code of the data object definition from the XSD).
    Note that you may also use iXML libraries to parse the XML.
    Please tell us more.
    BR
    Sandra

  • Facing problem in xml schema xsd file registration

    Hi,
    i am facing problem in xml schema xsd file registration when
    the number of column is more. It is showing persing error.
    if i am deleting few column from xsd file . It is working otherwise
    showing error. Is there any solution for that please suggest me.
    The Error is
    ORA-31011:XML parsing failed
    ORA_19202: Error occurred in XML processing
    LPX-00230 : (message vary time to time-like invalid tag ending etc.)
    Regards
    Manoranjan
    and thanks in advance

    Where is you XML coming from. Are you sure it's valid. If you are hard coding it as a SQL String constant are you hitting the 4k / 32K limit on the size of SQL / PL/SQL constant. Have you tried loading the content from a bfile..

  • How to parse XML against XSD,DTD, etc.. locally (no internet connection) ?

    i've searched on how to parse xml against xsd,dtd,etc.. without the needs of internet connection..
    but unfortunately, only the xsd file can be set locally and still there needs the internet connection for the other features, properties.
    XML: GML file input from gui
    XSD: input from gui
    javax.xml
    package demo;
    import java.io.File;
    import java.io.IOException;
    import java.net.MalformedURLException;
    import java.net.URL;
    import javax.xml.XMLConstants;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    import org.xml.sax.SAXException;
    public class Sample1WithJavaxXML {
         public static void main(String[] args) {
              URL schemaFile = null;
              try {
                   //schemaFile = new URL("http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd");
                   File file0 = new File("AppSchema-C01-v1_0.xsd");
                   schemaFile = new URL(file0.toURI().toString());
              } catch (MalformedURLException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              //Source xmlFile = new StreamSource(new File("web.xml"));
              Source xmlFile = new StreamSource(new File("C01.xml"));
              SchemaFactory schemaFactory = SchemaFactory
                  .newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              //File file1 = new File("XMLSchema.dtd");
              //SchemaFactory schemaFactory = SchemaFactory
                   //.newInstance("javax.xml.validation.SchemaFactory:XMLSchema.dtd");
              Schema schema = null;
              try {
                   schema = schemaFactory.newSchema(schemaFile);
              } catch (SAXException e1) {
                   // TODO Auto-generated catch block
                   e1.printStackTrace();
              Validator validator = schema.newValidator();
              try {
                validator.validate(xmlFile);
                System.out.println(xmlFile.getSystemId() + " is valid");
              } catch (SAXException e) {
                System.out.println(xmlFile.getSystemId() + " is NOT valid");
                System.out.println("Reason: " + e.getLocalizedMessage());
              } catch (IOException e) {
                   // TODO Auto-generated catch block
                   e.printStackTrace();
    }Xerces
    package demo;
    import java.io.File;
    import java.util.Date;
    import org.apache.xerces.parsers.DOMParser;
    public class SchemaTest {
         private String xmlFile = "";
         private String xsdFile = "";
         public SchemaTest(String xmlFile, String xsdFile) {
              this.xmlFile = xmlFile;
              this.xsdFile = xsdFile;
         public static void main (String args[]) {
              File file0 = new File("AppSchema-C01-v1_0.xsd");
              String xsd = file0.toURI().toString();
              SchemaTest testXml = new SchemaTest("C01.xml",xsd);
              testXml.process();
         public void process() {
              File docFile = new File(xmlFile);
              DOMParser parser = new DOMParser();
              try {
                   parser.setFeature("http://xml.org/sax/features/validation", true);
                   parser.setFeature("http://apache.org/xml/features/validation/schema", true);
                   parser.setProperty("http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
                             xsdFile);
                   ErrorChecker errors = new ErrorChecker();
                   parser.setErrorHandler(errors);
                   System.out.println(new Date().toString() + " START");
                   parser.parse(docFile.toString());
              } catch (Exception e) {
                   System.out.print("Problem parsing the file.");
                   System.out.println("Error: " + e);
                   System.out.println(new Date().toString() + " ERROR");
                   return;
              System.out.println(new Date().toString() + " END");
    }

    Thanks a lot Sir DrClap..
    I tried to use and implement the org.w3c.dom.ls.LSResourceResolver Interface which is based on the SAX2 EntityResolver.
    please give comments the way I implement it. Here's the code:
    LSResourceResolver Implementation
    import org.w3c.dom.ls.LSInput;
    import org.w3c.dom.ls.LSResourceResolver;
    import abc.xml.XsdConstant.Path.DTD;
    import abc.xml.XsdConstant.Path.XSD;
    public class LSResourceResolverImpl implements LSResourceResolver {
         public LSResourceResolverImpl() {
          * {@inheritDoc}
         @Override
         public LSInput resolveResource(String type, String namespaceURI, String publicId, String systemId, String baseURI) {
              ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
              LSInput input = new LSInputImpl(publicId, systemId, baseURI);
              if ("http://www.w3.org/2001/xml.xsd".equals(systemId)) {
                   input.setByteStream(classLoader.getResourceAsStream(XSD.XML));
              } else if (XsdConstant.PUBLIC_ID_XMLSCHEMA.equals(publicId)) {
                   input.setByteStream(classLoader.getResourceAsStream(DTD.XML_SCHEMA));
              } else if (XsdConstant.PUBLIC_ID_DATATYPES.equals(publicId)) {
                   input.setByteStream(classLoader.getResourceAsStream(DTD.DATATYPES));
              return input;
    }I also implement org.w3c.dom.ls.LSInput
    import java.io.InputStream;
    import java.io.Reader;
    import org.w3c.dom.ls.LSInput;
    public class LSInputImpl implements LSInput {
         private String publicId;
         private String systemId;
         private String baseURI;
         private InputStream byteStream;
         private String stringData;
         public LSInputImpl(String publicId, String systemId, String baseURI) {
              super();
              this.publicId = publicId;
              this.systemId = systemId;
              this.baseURI = baseURI;
         //getters & setters
    }Then, here's the usage/application:
    I create XMLChecker class (SchemaFactory implementation is Xerces)
    import java.io.File;
    import java.io.IOException;
    import java.util.ArrayList;
    import java.util.List;
    import javax.xml.XMLConstants;
    import javax.xml.stream.FactoryConfigurationError;
    import javax.xml.transform.Source;
    import javax.xml.transform.stream.StreamSource;
    import javax.xml.validation.Schema;
    import javax.xml.validation.SchemaFactory;
    import javax.xml.validation.Validator;
    import org.xml.sax.ErrorHandler;
    import org.xml.sax.SAXException;
    import org.xml.sax.SAXParseException;
    import abc.xml.XsdConstant.Path.XSD;
    public class XMLChecker {
         private ErrorMessage errorMessage = new ErrorMessage();
         public boolean validate(String filePath){
              final ClassLoader classLoader = Thread.currentThread().getContextClassLoader();
              List<Source> schemas = new ArrayList<Source>();
              schemas.add(new StreamSource(classLoader.getResourceAsStream(XSD.XML_SCHEMA)));
              schemas.add(new StreamSource(classLoader.getResourceAsStream(XSD.XLINKS)));
              schemas.add(new StreamSource(classLoader.getResourceAsStream("abc/xml/AppSchema.xsd")));
              SchemaFactory schemaFactory = SchemaFactory.newInstance(XMLConstants.W3C_XML_SCHEMA_NS_URI);
              schemaFactory.setResourceResolver(new LSResourceResolverImpl());
              try {
                   Schema schema = schemaFactory.newSchema(schemas.toArray(new Source[schemas.size()]));
                   Validator validator = schema.newValidator();
                   validator.setErrorHandler(new ErrorHandler() {
                        @Override
                        public void error(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                        @Override
                        public void fatalError(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                        @Override
                        public void warning(SAXParseException e) throws SAXException {
                             errorMessage.setErrorMessage(e.getMessage());
                             errorMessage.setLineNumber(e.getLineNumber());
                             errorMessage.setColumnNumber(e.getLineNumber());
                             throw e;
                   StreamSource source = new StreamSource(new File(filePath));
                   validator.validate(source);
              } catch (SAXParseException e) {
                   return false;
              } catch (SAXException e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              } catch (FactoryConfigurationError e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              } catch (IOException e) {
                   errorMessage.setErrorMessage(e.getMessage());
                   return false;
              return true;
         public ErrorMessage getErrorMessage() {
              return errorMessage;
    }Edited by: erossy on Aug 31, 2010 1:56 AM

  • HOW TO USE isSchemaValid() in oracle 9i to validate XML against XSD

    Hi
    I am trying to validate xml file against xsd in oracle 9i.The steps are as follows:
    *1.Created directory for xml and xsd file location:*
    CREATE or replace DIRECTORY XML_DATA AS 'D:\prod\sample xml and xsd;
    *2.Register the schema*
    DECLARE
    bf5 BFILE;
    BEGIN
    -- Register the schema
    dbms_lob.filecloseall;
    bf5 := BFILENAME('XML_DATA','xml1.xsd');
    DBMS_XMLSCHEMA.registerSchema('http://www.example.com/schemas/ipo.xsd',bf5,TRUE, TRUE, FALSE,TRUE,TRUE);
    -- dbms_lob.fileclose(bf5);
    END;
    *3.creatibg table to store xml files*
    CREATE TABLE po_tab2 (id NUMBER,xmlcol SYS.XMLType) ;
    *4.Inserting xml file into the table and validating that file with xml schema*
    declare
    aa clob:=' ';
    b varchar2(4000);
    c xmltype;
    begin
    dbms_lob.filecloseall;
    aa:= GETCLOBDOCUMENT('XML_DATA','example.XML','WE8MSWIN1252');
    INSERT INTO po_tab2 (ID, XMLCOL)
    VALUES
    (104,sys.XMLType.createXML(aa));
    commit;
    --c:=sys.xmltype.createXml(aa);
    c:=xmltype(aa);
    b:=VerifyXML(c,'http://www.example.com/schemas/ipo.xsd');
    dbms_output.put_line(b);
    end;
    _5.VerifyXML function is:_
    create or replace
    function VerifyXML( xml xmltype, xmlSchema varchar2 ) return varchar2 AUTHID DEFINER is
    xmlURL varchar2(4000);
    begin
    select
    s.qual_schema_url into xmlURL
    from user_xml_schemas s
    where s.schema_url = xmlSchema;
    if xml.isSchemaValid(xmlURL,'ManageRolloutRegionNotification') =1 then
    return( 'Valid. The supplied XML complies with XSD '||xmlURL );
    else
    -- return null;
    return(sqlcode|| 'Failed. The supplied XML does not comply with XSD '||xmlURL );
    end if;
    exception when others then
    return(sqlcode);
    end;
    _6.PROBLEM:_
    the problem is the function is always returning 'Failed ' status even though I am giving the correct file.. Is there any method to find the reason for failure. These codes are working fine oracle 11g. currently i am working in 9i version 9.2.0.1.0. I

    Oracle 9iR2 is not supported anymore.
    Oracle 9.2.0.8 is in sustained support.
    Oracle 9.2.0.1 is not supported at all.
    Upgrade to 11gR2.
    Sybrand Bakker
    Senior Oracle DBA

  • How to validate xml using xsd

    Hi All
    please tell me how to validate xml using xsd
    regards

    Try using this link:
    = http://www.google.nl/search?q=XML+validate+oracle for instance or
    = use the search button on this forum and / or
    = read the FAQ on this (XML DB FAQ
    Thanks Eddie et all, for educating me via http://awads.net/wp/2006/11/14/barts-punishment-for-asking-dumb-questions (don't mind the URL , the info there is really useful)
    The following link on this site is just brilliant: http://www.albinoblacksheep.com/flash/posting.php
    Grz
    Marco
    Message was edited by:
    mgralike

  • Difference/relationship between XML and XSD

    Hi All,
    Correct me if i am wrong,
    When we create a source and a target datatype in IR automatically objects will be created in XSD.
    The same way it does when we create message type.
    In message mapping, We map source and target message type and when we test with sample data, we can view source and target in xml
    My question is what is the difference/relationship between XML and XSD ?
    Thanks,
    ss

    Hi,
    XML (Extensible Markup Language) is a W3C initiative that allows information and services to be encoded with meaningful structure and semantics that computers and humans can understand. XML is great for information exchange, and can easily be extended to include user-specified and industry-specified tags.
    Whereas
    An XML Schema Definition (XSD) is an instance of an XML schema written in the XML Schema language. An XSD defines a type of XML document in terms of constraints upon what elements and attributes may appear, their relationship to each other, what types of data may be in them, and other things. It can be used with validation software in order to ascertain whether a particular XML document is of that type, and to produce a Post-Schema Validation Infoset.
    I hope this clarifies.
    Regards.
    Praveen

  • How to create our own XML Schema (.xsd) in Weblogic WorkShop

    Hi,
    I am new to Weblogic Workshop.I want to create one xml schema with custom elements.
    when I am creating a file xml schema(.xsd).The file contains default namespace and no child elements in it.I don't know how to add elements to that file.
    please tell me how to add parent elements and child elements and also our own xml namingspace.

    Hi Sivaram,
    Unfortunately, the 8.1 IDE did not have special tooling for schema generation.
    You will need to create it by hand or using an external tool
    If you are using an external tool to create the file within the schema project, you might want to disable the schema project auto build, which will be triggered every time a file save takes place
    cheers
    Raj

  • Validating XML against XSD

    Hi,
    I would like to validate XML against XSD using SAX parser. Can any one help, where I can get information. I could get some information of XML validation against DTD. But could not get much information for XSD validation.
    Which parser is good for validation against XSD? or shall I continue with SAX Parser?
    Kumaravel

    I use the "Summer 02 XML Pack" provided here at Sun, which is based on Xerces2 by Apache (http://xml.apache.org/xerces2-j/index.html). Actually with that, validation against schemas is pretty much like validation against DTDs, as long as the schema is referenced in your XML file and you switch on schema validation in the parser like
    reader.setFeature("http://xml.org/sax/features/validation", true);
    reader.setFeature("http://apache.org/xml/features/validation/schema", true);Xerces2 works both with DOM and SAX (I use SAX). You should browse Apache's website a bit. There's not too much information, but I guess it's enough to get started.

  • Validating XML via XSD

    Dear Experts,
    I have this code which validates my xml to xsd:
    SchemaFactory factory = SchemaFactory.newInstance(XML_SCHEMA_LANG);
    Schema schema = factory.newSchema(new StreamSource("" + this.getClass().getResource(xsd)));
    System.out.println("Validating :" + loc + xml + "" );
    Validator validator = schema.newValidator();
    validator.validate(new StreamSource(loc + xml));However if it finds a UTF-8 Special Character it throws an error like the one below in this case the UTF-8 Special Character was :
    org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x12) was found in the element content of the document.
         at weblogic.apache.xerces.parsers.AbstractSAXParser.parse(AbstractSAXParser.java:1189)
         at weblogic.xml.jaxp.WebLogicXMLReader.parse(WebLogicXMLReader.java:135)
         at weblogic.xml.jaxp.RegistryXMLReader.parse(RegistryXMLReader.java:152)Is there a way we can tell the validator to adjust to UTF-8?
    Thank you.
    Cordially,
    The Developer

    Cross-posted here: [http://forums.sun.com/thread.jspa?threadID=5396486&messageID=10760512#10760512]

  • Any pointers to xml or xsd forums?

    Hi,
    R there any forums for xml and xsd?

    google is best your friend
    for xml --> [http://forum.java.sun.com/forum.jspa?forumID=34]
    index for java forum --> [http://forum.java.sun.com/index.jspa]
    [http://www.tek-tips.com/threadminder.cfm?pid=426]

  • Validate XML against XSD with imported xsd's

    Hello,
    I'm stuck for a while attempting to validate a xml against some xsd's. In the code below you can find my xsd's structure: (I need to use this structure in order to reuse the baseXsd's files.
    CommonTypes.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="CommonTypes" targetNamespace="http://test.com/CommonTypes"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:simpleType name="NonEmptyString">
    <xs:restriction base="xs:string">
    <xs:minLength value="1"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:schema>
    CommonLog.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema id="CommonLogConfig"
    targetNamespace="http://test.com/CommonLogConfig"
    xmlns:cmn="http://test.com/CommonTypes"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:import schemaLocation="..\Base\CommonTypes.xsd" namespace="http://test.com/CommonTypes" />
    <xs:simpleType name="LogName">
    <xs:restriction base="xs:string"/>
    </xs:simpleType>
    <xs:simpleType name="LogPath">
    <xs:restriction base="cmn:NonEmptyString"/>
    </xs:simpleType>
    </xs:schema>
    LogConfig.xsd
    <?xml version="1.0" encoding="utf-8"?>
    <xs:schema xmlns:mlc="http://test.com/CommonLogConfig"
    targetNamespace="component1_LogConfig"
    xmlns:xs="http://www.w3.org/2001/XMLSchema"
    elementFormDefault="qualified"
    attributeFormDefault="qualified">
    <xs:import schemaLocation="..\Base\CommonLogConfig.xsd" namespace="http://test.com/CommonLogConfig" />
    <xs:element name="root">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="default">
    <xs:complexType>
    <xs:all>
    <xs:element name="LogName" type="mlc:LogName" fixed="component.name" />
    <xs:element name="LogPath" type="mlc:LogPath"/>
    </xs:all>
    </xs:complexType>
    </xs:element>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    LogConfig.xml
    <?xml version="1.0" encoding="utf-8"?>
    <root xmlns="component1_LogConfig">
    <default>
    <LogName>component.name</LogName>
    <LogPath></LogPath>
    </default>
    </root>
    As you can probably notice, the <LogPath> key on the LogConfig is empty, but, it is defined as a NonEmptyString type. That is the way I'm validating the xml against xsd:
    FileStream stream = new FileStream("LogConfig.xml", FileMode.Open);
    XmlValidatingReader vr = new XmlValidatingReader(stream, XmlNodeType.Element, null);
    vr.Schemas.Add(null, "LogConfig.xsd");
    vr.ValidationType = ValidationType.Schema;
    vr.ValidationEventHandler += new ValidationEventHandler(ValidationCallBack);
    while (vr.Read()) ;
    The validationCallBack is not being fired.
    I suppose it is possible since the visual studio show me the error at compile time:

    Well, it is weird, but, the code below works when validating the NonEmptyString type:
    XmlSchemaSet schemaSet = new XmlSchemaSet();
    schemaSet.Add(null, "LogConfig.xsd");
    XDocument doc1 = XDocument.Load("LogConfig.xml");
    doc1.Validate(schemaSet, new ValidationEventHandler(ValidationCallBack), false);
    However, if I leave the <LogName> empty it does not valid the values set on xsd fixed attribute, 
    The solution?
    Well, I'm validating the same xml twice, the code above and the code on my first question.

  • Valodate xml against xsd

    Hi ,
    I have the below as "position.xml"
    <?xml version="1.0" encoding="UTF-8"?>
    <position
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xsi:noNamespaceSchemaLocation="file://c:\wsad\workspace\sma\xml\position.xsd">
    <position_number>12345</position_number>
    <position_title>Sr. Engr</position_title>
    <report_to_position>23456</report_to_position>
    <incumbent>23456</incumbent>
    <operation>INSERT</operation>
    </position>
    and
    position.xsd is :
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="Root">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="position" type="positionType" maxOccurs="unbounded"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
         <xs:complexType name="positionType">
    <xs:sequence>
         <xs:element name="position_number" type="xs:string"/>
    <xs:element name="position_title" type="xs:string"/>
         <xs:element name="report_to_position" type="xs:string"/>
         <xs:element name="incumbent"           type="xs:string"/>
         <xs:element name="operation"           type="xs:string"/>
    </xs:sequence>
    </xs:complexType>
    </xs:schema>
    When i use the code:
    import org.apache.xerces.parsers.DOMParser;
    import java.io.File;
    public class SchemaTest {
         private String xmlFile = "";
         private String xsdFile = "";
         public SchemaTest(String xmlFile, String xsdFile) {
              this.xmlFile = xmlFile;
              this.xsdFile = xsdFile;
         public static void main(String args[]) {
              for (int i = 0; i < args.length; i++) {
                   switch (i) {
                        case 0 :
                             System.out.println("XML File=" + args);
                             break;
                        case 1 :
                             System.out.println("XSD File=" + args);
                             break;
                        default :
                             System.out.println("Unknown=" + args);
                             break;
              if (args.length != 2) {
                   System.err.println("Usage: <xml file> <xsd file>");
                   System.exit(1);
              SchemaTest testXml = new SchemaTest(args[0], args[1]);
              testXml.process();
         public void process() {
              File docFile = new File(xmlFile);
              try {
                   DOMParser parser = new DOMParser();
                   parser.setFeature("http://xml.org/sax/features/validation", true);
                   parser.setFeature("http://apache.org/xml/features/validation/schema",true);
                   parser.setFeature("http://apache.org/xml/features/validation/schema-full-checking", true);
    //               parser.setProperty("http://apache.org/xml/properties/schema/external-schemaLocation", xsdFile);
                   parser.setProperty(
                        "http://apache.org/xml/properties/schema/external-noNamespaceSchemaLocation",
                        xsdFile);
                   ErrorChecker errors = new ErrorChecker();
                   parser.setErrorHandler(errors);
                   parser.parse(docFile.toString());
              } catch (Exception e) {
                   System.out.print("Problem parsing the file.");
                   System.out.println("Error: " + e);
    I get the following error message:
    XML File=[Ljava.lang.String;@45a877
    XSD File=[Ljava.lang.String;@45a877
    Line 4...
    cvc-elt.1: Cannot find the declaration of element 'position'.
    Line 4...
    cvc-datatype-valid.1.2.1: 'file://c:\wsad\workspace\sma\xml\position.xsd' is not a valid value for 'anyURI'.
    Line 4...
    cvc-attribute.3: The value 'file://c:\wsad\workspace\sma\xml\position.xsd' of attribute 'xsi:noNamespaceSchemaLocation' on element 'position' is not valid with respect to its type, 'anyURI'.
    Can someone help !!!!!!!!
    Thanks !

    cvc-datatype-valid.1.2.1: 'file://c:\wsad\workspace\sma\xml\position.xsd' is not a valid value for 'anyURI'.I am guessing that's in a place that is supposed to have a URI. Well, if you're going to have backslashes in a URI then you have to escape them as %5C. But if you meant for them to separate directory names, then replace them by slashes as per the URI specification.

  • Validate XML with XSD

    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit Production
    with the partitioning, real application clusters, olap, data mining
    and Real Application Testing options
    Working with relational tables containing clob type columns (no XMLDB available) I'm not able to set up a simple validation example as below (supposed to return 1 confirming a successful validation).
    declare
      xmldoc xmltype;
      sb_xml xmltype;
      valid_ number;
      xmlxsd varchar2(4000) := q'~<?xml version="1.0" ?>
                                  <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
                                  <xs:element name="greeting" type="xs:string" />
                                  </xs:schema>~';
      xmlxml varchar2(32767) := q'~<?xml version="1.0" ?><greeting>"HELLO !"</greeting>~';
    begin
      xmldoc := xmltype(xmlxml);
      sb_xml := xmldoc.createschemabasedxml();
      valid_ := sb_xml.isschemavalid(xmlxsd);
      dbms_output.put_line('IsSchemaValid (0=false,1=true): ' || to_char(valid_));
    end;Thanks in advance for any kind of help provided
    Etbin

    no XMLDB availablenot sure if it will work without xmldb, but you might try to use java for schema validation:
    SQL> CREATE OR REPLACE AND RESOLVE JAVA SOURCE NAMED "SchemaUtil"
      2  as
      3
      4  import oracle.xml.parser.schema.*;
      5  import oracle.xml.parser.v2.*;
      6  import oracle.sql.CHAR;
      7  import java.io.*;
      8
      9  public class SchemaUtil
    10  {
    11     public static String validation(CHAR xml, CHAR xsd)
    12     throws Exception
    13     {
    14        //Build Schema Object
    15        XSDBuilder builder = new XSDBuilder();
    16        byte [] docbytes = xsd.getBytes();
    17        ByteArrayInputStream in = new   ByteArrayInputStream(docbytes);
    18        XMLSchema schemadoc = (XMLSchema)builder.build(in,null);
    19        //Parse the input XML document with Schema Validation
    20        docbytes = xml.getBytes();
    21        in = new ByteArrayInputStream(docbytes);
    22        DOMParser dp  = new DOMParser();
    23        // Set Schema Object for Validation
    24        dp.setXMLSchema(schemadoc);
    25        dp.setValidationMode(XMLParser.SCHEMA_VALIDATION);
    26        dp.setPreserveWhitespace (true);
    27        StringWriter sw = new StringWriter();
    28        dp.setErrorStream (new PrintWriter(sw));
    29        try
    30        {
    31           dp.parse (in);
    32           sw.write("The input XML parsed without errors.\n");
    33        }
    34        catch (XMLParseException pe)
    35        {
    36             sw.write("Parser Exception: " + pe.getMessage());
    37          }
    38        catch (Exception e)
    39          {
    40             sw.write("NonParserException: " + e.getMessage());
    41          }
    42          return sw.toString();
    43     }
    44   }
    45  /
    Java created.
    SQL>
    SQL> create or replace function schemavalidation(xml in varchar2,xsd in varchar2)
      2  return varchar2 is language java name 'SchemaUtil.validation(oracle.sql.CHAR,oracle.sql.CHAR)
      3                   returns java.lang.String';
      4  /
    Function created.
    SQL>
    SQL> select schemavalidation('<?xml version="1.0" ?><greeting>"HELLO !"</greeting>',
      2                           '<?xml version="1.0" ?>
      3                          <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
      4                          <xs:element name="greeting" type="xs:string" />
      5                          </xs:schema>') schemavalidation from dual
      6  /
    SCHEMAVALIDATION
    The input XML parsed without errors.
    SQL>

  • Validate XML against XSD using PLSQL

    Hi,
    We now need some kind of automated solution that will pick
    up the XMLs from a specific location or table and validate them
    against the XSD in only Oracle PLSQL.
    The validation of the XML against the XSD should take place when the XML is parsed.
    I want to know how first the XSD's are stored or registered in the Oracle XDB repository.
    Please can anyone suggest me how this can be done with a simple example
    with a sample XML and XSD?
    Regards,
    Marlon.

    Hi, I'm not an expert but I've been reading a lot and I found this and it works. I'll hope it is useful.(Oracle 10)
    declare
    -- Local variables here
    res BOOLEAN;
    tempXML XMLType;
    xmlDoc XMLType;
    xmlSchema XMLType;
    schemaURL varchar2(256) := 'testcase.xsd';
    schemaPath varchar2(256) := '/public/testcase.xsd';
    begin
    dbms_xmlSchema.deleteSchema(schemaURL,4);
    -- Test statements here
    xmlSchema := xmlType(
    '<?xml version="1.0" encoding="UTF-8"?>
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:xdb="http://xmlns.oracle.com/xdb"
    elementFormDefault="qualified" attributeFormDefault="unqualified">
    <xs:element name="root" xdb:defaultTable="ROOT_TABLE">
    <xs:complexType>
    <xs:sequence>
    <xs:element name="child1"/>
    <xs:element name="child2"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    dbms_xmlschema.registerSchema(schemaURL,
    xmlSchema , --xdbURIType(schemaPath).getClob(),
    TRUE,TRUE,FALSE,TRUE
    xmlDoc:=xmltype('<root xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="' || schemaURL || '"><child1>foo</child1><child2>bar</child2></root>');
    dbms_output.put_line(xmlDoc.getStringVal());
    xmlDoc.schemaValidate();
    END;

Maybe you are looking for