Help with Kalani 70-320 Training Guide question on XML schemas

Discussion in 'MCAD' started by Pookee, Sep 29, 2004.

  1. Pookee

    Pookee Guest

    In the exam questions for chapter 1 of Kalani's 70-320 training guide
    there is a question about XML schema files that I do not understand.
    Here is the question and answer:

    You have been assigned the task of developing an XML schema file to
    serve as part of the data later of your company's new Web application.
    The application will deliver details on sporing events to
    subscribers. Each sporting event is characterized by several peices
    of information, including the date, sport, and teams involved. What
    should you use to represent a sporting event in the XML schema?

    A. Complex type
    B. Simple type
    C. Element
    D. Attribute

    The answer is A. Explanation: Because the sporting event will contain
    several pieces of information, it is best represented as a complex
    type. The sonstituent pieces of information within this type can be
    represented by elements, attributes, or simple types.

    I understand that B is wrong because simple types are used to define
    constraints for element values and I see that D is wrong because the
    sporting event has more than one piece of data associated with it. My
    question is - what is the difference between A and C? An element can
    contain several pieces of information can't it? When I look at the
    XML behind the schema created in the step by steps I see that all of
    the elements are children of an <xs:complexType> element. This is not
    really explained in the book and MSDN only says that a complex type
    "determines the set of attributes and the content of an element". Can
    someone give me a more thourough explanation of what a complex type is
    and how it relates to an element and this question?
     
    Pookee, Sep 29, 2004
    #1
    1. Advertising

  2. Pookee

    Hermit Dave Guest

    element and attributes are xml grammer

    <sport>basketball</sport> is an element..
    <sport team="NBA"></sport>
    team here is the attribute.

    so if you have xml like
    <sport>
    <name>basketball</name>
    <teams>9</teams>
    </sport>

    how can you represent it with a schema.. consider that the above is a class.
    Would Sport be a primitive type ? or could you write a custom class which
    would have different fields representing the different properties of that
    sport ?
    its a complex type or a custom class.. that my friend is the reason why its
    A.

    For the reason above it cannot be B and since we are talking about XML
    Schema and not XML in general it cannot be C or D

    --

    Regards,

    Hermit Dave
    (http://hdave.blogspot.com)
    "Pookee" <> wrote in message
    news:...
    > In the exam questions for chapter 1 of Kalani's 70-320 training guide
    > there is a question about XML schema files that I do not understand.
    > Here is the question and answer:
    >
    > You have been assigned the task of developing an XML schema file to
    > serve as part of the data later of your company's new Web application.
    > The application will deliver details on sporing events to
    > subscribers. Each sporting event is characterized by several peices
    > of information, including the date, sport, and teams involved. What
    > should you use to represent a sporting event in the XML schema?
    >
    > A. Complex type
    > B. Simple type
    > C. Element
    > D. Attribute
    >
    > The answer is A. Explanation: Because the sporting event will contain
    > several pieces of information, it is best represented as a complex
    > type. The sonstituent pieces of information within this type can be
    > represented by elements, attributes, or simple types.
    >
    > I understand that B is wrong because simple types are used to define
    > constraints for element values and I see that D is wrong because the
    > sporting event has more than one piece of data associated with it. My
    > question is - what is the difference between A and C? An element can
    > contain several pieces of information can't it? When I look at the
    > XML behind the schema created in the step by steps I see that all of
    > the elements are children of an <xs:complexType> element. This is not
    > really explained in the book and MSDN only says that a complex type
    > "determines the set of attributes and the content of an element". Can
    > someone give me a more thourough explanation of what a complex type is
    > and how it relates to an element and this question?
     
    Hermit Dave, Sep 29, 2004
    #2
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. =?Utf-8?B?Y2Jt?=

    70-320 xml question

    =?Utf-8?B?Y2Jt?=, Jan 9, 2006, in forum: MCSD
    Replies:
    9
    Views:
    435
    =?Utf-8?B?Y2Jt?=
    Jan 12, 2006
  2. cSharpzone
    Replies:
    4
    Views:
    381
  3. BOGABOGA
    Replies:
    3
    Views:
    741
    BOGABOGA
    Apr 12, 2005
  4. BOGABOGA
    Replies:
    8
    Views:
    598
  5. jacksu
    Replies:
    5
    Views:
    444
Loading...

Share This Page