XML Reader Module#

nexus.xmlreader.parse_string(s, delim=None)[source]#
nexus.xmlreader.find_pair(s, pairs, start=0, end=None)[source]#
nexus.xmlreader.remove_pair_sections(s, pair)[source]#
nexus.xmlreader.remove_empty_lines(s)[source]#

Remove any lines with only whitespace present.

class nexus.xmlreader.XMLelement[source]#

Bases: DevBase

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

condense()

convert_numeric()

error(message[, header, exit, trace])

Report an error inside a class.

first()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_required

check_types

check_types_optional

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

delete

delete_optional

delete_required

dict

extract

extract_optional

get

get_optional

get_path

get_required

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

path_exists

random_key

remove_hidden

select_random

serial

set

set_optional

set_path

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

condense()[source]#
convert_numeric()[source]#
remove_hidden()[source]#
class nexus.xmlreader.XMLreader(fpath=None, element_joins=None, element_aliases=None, contract_names=False, strip_prefix=None, warn=True, xml=None)[source]#

Bases: DevBase

Methods

append(value)

class_error(message[, header, exit, trace, ...])

Report an error relating to a class.

error(message[, header, exit, trace])

Report an error inside a class.

first()

include_files()

keys()

list(*keys)

open_log(filepath)

save([fpath])

sorted_keys()

warn(msg[, indent])

Warning from inside a Nexus class.

add

add_optional

check_required

check_types

check_types_optional

class_get

class_has

class_items

class_keys

class_log

class_set

class_set_optional

class_set_single

class_warn

clear

close_log

copy

copy_from

copy_to

data_repr

decrement_level

delete

delete_optional

delete_required

dict

extract

extract_optional

found_attribute

found_element_end

found_element_start

found_text

get

get_optional

get_path

get_required

increment_level

inverse

items

last

list_optional

load

log

move_from

move_from_optional

move_to

move_to_optional

not_implemented

obj

path_exists

random_key

select_random

serial

set

set_optional

set_path

shallow_copy

to_dict

to_obj

transfer_from

transfer_to

tree

tuple

values

write

include_files()[source]#
increment_level()[source]#
decrement_level()[source]#
found_element_start(ename, attributes)[source]#
found_element_end(name)[source]#
found_text(rawtext)[source]#
found_attribute(ename, aname, atype, default, required)[source]#
nexus.xmlreader.readxml(fpath=None, element_joins=None, element_aliases=None, contract_names=False, strip_prefix=None, warn=True, xml=None)[source]#