j-users@xerces.apache.org
[Top] [All Lists]

Re: DOM document serialization question

Subject: Re: DOM document serialization question
From: Michael Glavassevich
Date: Thu, 6 Mar 2008 08:56:37 -0500
By attach do you mean adding the 'xsi:noNamespaceSchemaLocation' attribute
to the root element of your document?

Michael Glavassevich
XML Parser Development
IBM Toronto Lab
E-mail: mrglavas@xxxxxxxxxx
E-mail: mrglavas@xxxxxxxxxx

"Heinrich Roman" <roman.heinrich@xxxxxxxxxx> wrote on 03/06/2008 07:55:50
AM:

> Hello,
> I have an DOM document, which I want to serialize and I want also to
> attach xsd document inside the generated xml.
> The ouput should be like this:
> <?xml version="1.0" encoding="ISO-8859-1"?>
> <shiporder orderid="889923"
> xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance";
> xsi:noNamespaceSchemaLocation="shiporder.xsd">
>  <orderperson>John Smith</orderperson>
>  <shipto>
>   <name>Ola Nordmann</name>
>   <address>Langgt 23</address>
>   <city>4000 Stavanger</city>
>   <country>Norway</country>
>  </shipto>
>  <item>
>   <title>Empire Burlesque</title>
>   <note>Special Edition</note>
>   <quantity>1</quantity>
>   <price>10.90</price>
>  </item>
>  <item>
>   <title>Hide your heart</title>
>   <quantity>1</quantity>
>   <price>9.90</price>
>  </item>
> </shiporder>
> Or it`s possible to have shiporder.xsd direct inside xml ?
> Can anybody provide me with an example ?
> Thanks.


---------------------------------------------------------------------
To unsubscribe, e-mail: j-users-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: j-users-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>