XMLParser - The XML Configuration Parser Module.
use DBIWrapper::XMLParser; my $obj = DBIWrapper::XMLParser->new(file => "config.xml"); my $resultSetObj = $obj->parse; # this is a ResultSet object.
XMLParser will parse XML files that have been generated by the DBIWrapper readXML method. See the DBIWrapper::ResultSet man page for the structure of the returned data.
scalar new(file, string) Creates a new instance of the DBIWrapper::ResultSet object. file points to the XML Config file to use.
If you don't specify a file to work with then you must specify the xml via the string argument. If you specify both, then the string will take precedence. The file must still point to a valid file.
DBIWrapper::ResultSet parse(void) Does the actual parsing of the XML file and generates the resulting data object and returns it.
string getVersion(void) returns the version value from the parent <resultset> tag.
resultFile - The xml file name we are working with or the contents of the string of xml passed in.
resultSetVersion - The version of the XML file we require.
resultSetObj - ResultSet object that represents the xml file.
xmlObj - The XML::LibXML object being used to parse the XML File.
NOTE: All data fields are accessible by specifying the object and pointing to the data member to be modified on the left-hand side of the assignment. Ex. $obj->variable($newValue); or $value = $obj->variable;
Xperience, Inc. (mailto:admin at pcxperience.com)
perl(1), DBIWrapper::ResultSet(3)