• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

How to define an array in xml schema

 
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,
I am working on a xml schema and I am stuck ! I would like to define an element as a array of data. Is that possible ?
Thanks for your help !
 
Ranch Hand
Posts: 1183
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
How about a list?
Something like -
 
raphael Bereh
Ranch Hand
Posts: 79
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes,
I thought about that but I am not sure if I will have to define each element in the List. In fact, I have a C source code that define a array of structure :
my_struct[MAX]
where my_struct is :
typedef struct
{
int a ;
int b ;
another_structure ;
}my_struct ;
and MAX is :
const int MAX = something ;
If I use a List I don't really understand how things will follow !!!?!???
Thanks.
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No, even xsd:list cannot accomplish what you want to do. Since list is a simpleType.
Read here:
http://www.w3.org/TR/xmlschema-0/#ListDt
 
Consider Paul's rocket mass heater.
reply
    Bookmark Topic Watch Topic
  • New Topic