Replace elements in some xml part of a model

create.xml.element(...)

Arguments

l,

list, corresponding to a subset of xml part a model

element,

character of length 1, where in the list should be find what to change

type,

character of length 2, giving correspondance between original and final type

value,

named vector, giving correspondance between new values (values) and old ones (names)

Value

a list of same structure than l with types ans values changed.

Examples

if (FALSE) {
model  = load.model("test_1", "dwelling")
xml = replace.in.xml(model$xml$building)
}