Skip to contents

The Serializer class provides methods to convert a Model object to other forms, for example, write out a Model to a file.



A redland statement object


See also

redland: redland package


world <- new("World")
storage <- new("Storage", world, "hashes", name="", options="hash-type='memory'")
model <- new("Model", world, storage, options="")
filePath <- system.file("extdata/example.rdf", package="redland")
parser <- new("Parser", world)
parseFileIntoModel(parser, world, filePath, model)
# Creat the default "rdfxml" serizlizer
serializer <- new("Serializer", world)
# Add a namespace definition to the serializer
status <- setNameSpace(serializer, world, namespace="", prefix="dc")
rdf <- serializeToCharacter(serializer, world, model, baseUri="")