• 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

Xml Schema (xsd element/attribute) question

 
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Howdy all,
Working with jaxb and I'm wondering if anyone knows how to represent this xml definition in an xsd. I want the resulting xml to be
<myElement id="123">here is some text</myElement>
I'm not sure if this is possible givin my limited experience with xsds, etc. It seems the only thing I can define is this
<myElement id="123">
<mySubElement>here is some text</mySubElement>
</myElement>
by doing this

Any help would be appreciated. Thanks.
Sean
 
Ranch Hand
Posts: 1953
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Sean
I think this will work.

Read here: http://www.xml.com/pub/a/2001/08/22/easyschema.html. A real great article, I learned a lot from it.
 
Sean MacLean
author
Posts: 621
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Roseanne,
That's exactly what I was looking for. Nice article too ... most of what I could find was the same old "PO" (purchase order) example everywhere. This site was helpful too though.
http://www.w3schools.com/schema/default.asp
Thanks again. (Hope all is well here at the ranch too)
Sean
 
Forget Steve. Look at this tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic