You are testing a component that serializes the Meeting class instances so that they can be
saved to the file system. The Meeting class has the following definition:
Public Class Meeting
Private title As String
Public roomNumber As Integer
Public invitees As String()
Public Sub New()End Sub
Public Sub New(ByVal t As String)
title = t
End Sub End Class The component contains a procedure with the following code segment.
Dim myMeeting As New Meeting("Goals") myMeeting.roomNumber = 1100 Dim
attendees As String() = New String(1) {"Braindumps", "Mary"} myMeeting.invitees =
attendees
Dim xs As New XmlSerializer(GetType(Meeting)) Dim writer As New
StreamWriter("C:\Meeting.xml") xs.Serialize(writer, myMeeting) writer.Close() You need to
identify the XML block that is written to the C:\Meeting.xml file as a result of running this
procedure. Which XML block represents the content that will be written to the C:\Meeting.xml file?
A. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>Goals</title>
<roomNumber>1100</roomNumber>
<invitee>Braindumps</invitee>
<invitee>Mary</invitee>
</Meeting>
B. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
<string>Mary</string>
</invitees>
</Meeting>
C. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
title="Goals">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
<string>Mary</string>
</invitees>
</Meeting>
D. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
</invitees>
<invitees>
<string>Mary</string>
</invitees>
</Meeting>
Answer: B
saved to the file system. The Meeting class has the following definition:
Public Class Meeting
Private title As String
Public roomNumber As Integer
Public invitees As String()
Public Sub New()End Sub
Public Sub New(ByVal t As String)
title = t
End Sub End Class The component contains a procedure with the following code segment.
Dim myMeeting As New Meeting("Goals") myMeeting.roomNumber = 1100 Dim
attendees As String() = New String(1) {"Braindumps", "Mary"} myMeeting.invitees =
attendees
Dim xs As New XmlSerializer(GetType(Meeting)) Dim writer As New
StreamWriter("C:\Meeting.xml") xs.Serialize(writer, myMeeting) writer.Close() You need to
identify the XML block that is written to the C:\Meeting.xml file as a result of running this
procedure. Which XML block represents the content that will be written to the C:\Meeting.xml file?
A. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<title>Goals</title>
<roomNumber>1100</roomNumber>
<invitee>Braindumps</invitee>
<invitee>Mary</invitee>
</Meeting>
B. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
<string>Mary</string>
</invitees>
</Meeting>
C. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
title="Goals">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
<string>Mary</string>
</invitees>
</Meeting>
D. <?xml version="1.0" encoding="utf-8"?>
<Meeting xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<roomNumber>1100</roomNumber>
<invitees>
<string>Braindumps</string>
</invitees>
<invitees>
<string>Mary</string>
</invitees>
</Meeting>
Answer: B
No comments:
Post a Comment