You create the definition for a Vehicle class by using the following code segment.
Public Class Vehicle
<XmlAttribute(AttributeName:="category")> _
Public vehicleType As String
Public model As String
<XmlIgnore> _
Public year As Integer
<XmlElement(ElementName:="mileage")> _
Public miles As Integer
Public condition As ConditionType
Public Sub New()
End Sub
Public Enum ConditionType
<XmlEnum("Poor")> BelowAverage
<XmlEnum("Good")> Average
<XmlEnum("Excellent")> AboveAverage
End Enum
End Class
you create an instance of the Vehicle class. You populate the public fields of the Vehicle
instance as shown in the following table:
MemberValuevehicleTypecarmodelraceryear2002miles15000conditionAboveAverage
You need to identify the XML block that is produced when this Vehicle class instance is
serialized.
Which block of XML represents the output of serializing the Vehicle instance?
A. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema""
vehicleType="car">
<model>racer</model>
<miles>15000</miles>
<condition>AboveAverage</condition>
</Vehicle>
B. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
category="car">
<model>racer</model>
<mileage>15000</mileage>
<condition>Excellent</condition>
</Vehicle>
C. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
category="car">
<model>racer</model>
<mileage>15000</mileage>
<conditionType>Excellent</conditionType>
</Vehicle>
D. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<category>car</category>
<model>racer</model>
<mileage>15000</mileage>
<condition>Excellent</condition>
</Vehicle>
Answer: B
Public Class Vehicle
<XmlAttribute(AttributeName:="category")> _
Public vehicleType As String
Public model As String
<XmlIgnore> _
Public year As Integer
<XmlElement(ElementName:="mileage")> _
Public miles As Integer
Public condition As ConditionType
Public Sub New()
End Sub
Public Enum ConditionType
<XmlEnum("Poor")> BelowAverage
<XmlEnum("Good")> Average
<XmlEnum("Excellent")> AboveAverage
End Enum
End Class
you create an instance of the Vehicle class. You populate the public fields of the Vehicle
instance as shown in the following table:
MemberValuevehicleTypecarmodelraceryear2002miles15000conditionAboveAverage
You need to identify the XML block that is produced when this Vehicle class instance is
serialized.
Which block of XML represents the output of serializing the Vehicle instance?
A. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema""
vehicleType="car">
<model>racer</model>
<miles>15000</miles>
<condition>AboveAverage</condition>
</Vehicle>
B. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
category="car">
<model>racer</model>
<mileage>15000</mileage>
<condition>Excellent</condition>
</Vehicle>
C. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema"
category="car">
<model>racer</model>
<mileage>15000</mileage>
<conditionType>Excellent</conditionType>
</Vehicle>
D. <?xml version="1.0" encoding="utf-8"?>
<Vehicle
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<category>car</category>
<model>racer</model>
<mileage>15000</mileage>
<condition>Excellent</condition>
</Vehicle>
Answer: B
No comments:
Post a Comment