Main Page   Namespace List   Alphabetical List   Compound List   File List   Compound Members   File Members  

xmlutils.h File Reference

some utility functions to make the gnome xml library more tolerable More...

#include <libxml++/libxml++.h>
#include <string>

Include dependency graph for xmlutils.h:

Include dependency graph

This graph shows which files directly or indirectly include this file:

Included by dependency graph

Go to the source code of this file.

Functions

xmlpp::Node * getFirstChild (xmlpp::Node *node, const std::string &name)
 return the first child matching name

std::string getChildContent (xmlpp::Node *node)
 return the content from the specified node

bool getChildContent (xmlpp::Node *node, const std::string &name, std::string &val)
 get the contents of a named node

std::string getPropValue (xmlpp::Node *node, const std::string &name)
 get the specified property

xmlpp::Node * addChild (xmlpp::Node *parent, xmlpp::Node *child)
 add a new child to parent (only need this because #%! libxml has a poor interface)


Detailed Description

some utility functions to make the gnome xml library more tolerable

Author:
Cameron Dorrat
Date:
Sun Dec 1 20:05:33 2002

Copyright (C) 2002 Cameron Dorrat

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.

Definition in file xmlutils.h.


Function Documentation

xmlpp::Node* addChild xmlpp::Node *    parent,
xmlpp::Node *    child
 

add a new child to parent (only need this because #%! libxml has a poor interface)

Parameters:
parent the parent node
child the child to add
Returns:
a ptr to the new child or NULL on failure

Definition at line 112 of file xmlutils.cpp.

Referenced by PlayListConverter::copy_format_name().

bool getChildContent xmlpp::Node *    node,
const std::string &    name,
std::string &    val
 

get the contents of a named node

Parameters:
node the node to start the child search from
name the name of the child node to look for
val the childs value
Returns:
true if the child was found

Definition at line 67 of file xmlutils.cpp.

References getFirstChild().

Referenced by PlayListConverter::get_formats(), EmpParser::get_session_info(), EmpParser::get_track_info(), and PlayListConverter::load_format().

std::string getChildContent xmlpp::Node *    node
 

return the content from the specified node

Parameters:
node the node to get the contents for
Returns:
the child node contents as a string

Definition at line 34 of file xmlutils.cpp.

xmlpp::Node* getFirstChild xmlpp::Node *    node,
const std::string &    name
 

return the first child matching name

Parameters:
node the node to search for children under
name the name of the child to look for
Returns:
true on success

Definition at line 49 of file xmlutils.cpp.

Referenced by EmpParser::get_session_info(), EmpParser::get_track_info(), getChildContent(), and PlayListConverter::load_config().

std::string getPropValue xmlpp::Node *    node,
const std::string &    name
 

get the specified property

Parameters:
node the node to get a property for
name the name of the property to get
Returns:
the property value (or an empty string if not found)

Definition at line 88 of file xmlutils.cpp.

Referenced by PlayListConverter::get_formats(), PlayListConverter::load_config(), and PlayListConverter::load_format().


Generated on Sat May 3 09:16:16 2003 for empxform by doxygen1.3-rc3