OASIS Mailing List ArchivesView the OASIS mailing list archive below
or browse/search using MarkMail.


Help: OASIS Mailing Lists Help | MarkMail Help

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

simple xml question

I am a virgin xml user and having a bit or trouble with what I believe
must be a simple process

If I take this sample xml straight from the w3 sebsite

<?xml version="1.0"?>
    <name>Tove Svendson</name>
    <street>Ragnhildvei 2</street>
    <address>4000 Stavanger</address>
      <title>Empire Burlesque</title>
      <title>Hide your heart</title>

and get the schema from the same website
<xsd:schema xmlns:xsd="http://www.w3.org/1999/XMLSchema">

<xsd:element     name="shipOrder" type="order"/>

<xsd:complexType name="order">
  <xsd:element   name="shipTo"    type="shipAddress"/>
  <xsd:element   name="items"     type="cdItems"/>

<xsd:complexType name="shipAddress">
  <xsd:element   name="name"      type="xsd:string"/>
  <xsd:element   name="street"    type="xsd:string"/>
  <xsd:element   name="address"   type="xsd:string"/>
  <xsd:element   name="country"   type="xsd:string"/>

<xsd:complexType name="cdItems">
  <xsd:element   name="item"      type="cdItem"/>

<xsd:complexType name="cdItem">
  <xsd:element   name="title"     type="xsd:string"/>
  <xsd:element   name="quantity"  
  <xsd:element   name="price"     type="xsd:decimal"/>


I can load both into my DOM and both are OK

but how can I validate my XML against the schema as the two
are completely seperate entities ??????

Howard Kidd
	Mobile	+44 7973 839833
@ Syntegra
	Tel	+44 1932 773574
@ Diamond Software Systems
	Tel 	+44 20 83351941
@ Home
	Tel 	+44 20 83982856


Check us out at http://www.syntegra.com