Learn R Programming

moodef (version 1.2.0)

generate_xml_file: Generate questions xml file

Description

Generate questions xml file

Usage

generate_xml_file(qc, file)

# S3 method for question_category generate_xml_file(qc, file = NULL)

Value

A question_category.

Arguments

qc

A question_category object.

file

A string, file name.

See Also

Other question definition functions: define_extended_question(), define_question(), define_questions_from_csv(), define_questions_from_data_frame(), define_questions_from_excel(), generate_xml(), question_category()

Examples

Run this code

qc <- question_category(category = 'Initial test') |>
  define_question(
    question = 'What are the basic arithmetic operations?',
    answer = 'Addition, subtraction, multiplication and division.',
    a_1 = 'Addition and subtraction.',
    a_2 = 'Addition, subtraction, multiplication, division and square root.'
  ) |>
  generate_xml_file(file = tempfile(fileext = '.xml'))

Run the code above in your browser using DataLab