My Project
Static Public Member Functions | List of all members
ParaScripting::ParaXML Class Reference

ParaXML class. More...

#include <ParaScriptingIO.h>

Static Public Member Functions

static int LuaXML_ParseString (lua_State *L)
 only used for documentation generation. More...
 
static int LuaXML_ParseFile (lua_State *L)
 
static void SetCondenseWhiteSpace (bool condense)
 The world does not agree on whether white space should be kept or not. More...
 
static bool IsWhiteSpaceCondensed ()
 Return the current white space setting.
 

Detailed Description

ParaXML class.

Member Function Documentation

§ LuaXML_ParseString()

int ParaScripting::ParaXML::LuaXML_ParseString ( lua_State L)
static

only used for documentation generation.

Parameters
filenamestring
Returns
return a table containing the lua table of xml Specifications: A tree is a Lua table representation of an element and its contents. The table must have a name key, giving the element name. The tree may have a attr key, which gives a table of all of the attributes of the element. Only string keys are relevant. If the element is not empty, each child node is contained in tree[1], tree[2], etc. Child nodes may be either strings, denoting character data content, or other trees.

Spec by example lz = ParaXML.LuaXML_ParseString[[<paragraph justify="centered">first childboldsecond child</paragraph>]] lz = {name="paragraph", attr={justify="centered"}, [1] = "first child", [2] = {name="b", "bold", n=1} [3] = "second child", n=3 }

§ SetCondenseWhiteSpace()

void ParaScripting::ParaXML::SetCondenseWhiteSpace ( bool  condense)
static

The world does not agree on whether white space should be kept or not.

In order to make everyone happy, these global, static functions are provided to set whether or not the parser will condense all white space into a single space or not. The default is to condense. Note changing this value is not thread safe.


The documentation for this class was generated from the following files: