File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

need help in XSD.

 
S. Nitesh
Ranch Hand
Posts: 36
1
Chrome Linux VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

I am a newbie in xsd.
I want to construct xsd for following xml format.

<a>
<b>some text<b/>
<c>some int<c/>
<d>some decimal<d/>
</a>

the main thing is that the xsd should allow <b>,<c> and <d> in any order with more than one occurrence of tag <d>.

thanks in advance.

-Nitesh


 
Juraj Somorovsky
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Nitesh,

There is the XSD schema:



The solution has one constraint: The <d> element cannot be used as a first element in <a>.
I don't know if it could be solved better, this is the best solution I've found.

However, I hope it will help you.

Juraj
 
S. Nitesh
Ranch Hand
Posts: 36
1
Chrome Linux VI Editor
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thanks Juraj.

It worked....
Thanks again.

-
Nitesh
 
It is sorta covered in the JavaRanch Style Guide.
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic