XML
Updated for version 3.38
BeardLib.Utils.XML
Bunch of functions useful when dealing with tables from custom_xml files.
Functions
Function | Return Type | Description |
---|---|---|
GetNode(Table tbl, String meta) | Table | Returns the first node the function finds that have the meta |
FindNode(Table tbl, String metas) | Table | Same as GetNode but allows you to find the node like this: node/a/b/c |
GetNodes(Table tbl, String meta) | Table | Same as GetNode but packs every node it finds into a table |
GetNodeIndex(Table tbl, Table node) | Number | Returns the index of |
GetIndexMeta(Table tbl, String meta) | Number | Returns the index of the first node the function find that has the meta |
GetMetaIndics(Table tbl, String meta) | Table | Like |
Other
Function | Description |
---|---|
SetNode(Table tbl, Table node, Table new_node) | Searches for |
SetNodeMeta(Table tbl, String node, Table new_node) | Like |
CleanKeys(Table tbl, Boolean shallow) | Cleans the table from keys; keeping only the indices. |
CleanIndices(Table tbl, Boolean shallow) | Like |
Clean(Table tbl, Boolean shallow) | A special clean function. Removes keys only if the table contains at least two indices of the same meta, removes indices if only one of the same meta as the key exists. In other words, makes sure that when you save the XML it won't duplicate shit |
InsertNode(Table tbl, Table node) | Like table insert but, inserts a node properly so script serializer (what converts it into custom_xml) won't think the key and first index are the same thing |
Last updated