#includeusing namespace SimpleXML; Value v = Array(); v[0] = 1; v[1] = true; v[2] = "hello"; v.endArray(); std::cout << v.toXML() << std::endl;
#includeThis code creates the same LLSD array as in example 1, but using the libomv package library. It then calls the encodeArray function to encode the LLSD data into binary format, and calls the endArray function to finish writing the array. The binary data is then output to the console using the dump function.using namespace LLSD; BinaryRefPtr data = BinaryRef::create(); encodeArray(data, Array() << 1 << true << "hello"); data->endArray(); std::cout << data->dump() << std::endl;