Main Page   File List   Globals  

property.h File Reference

Property functions. More...

#include <libgnurdf/types.h>

Go to the source code of this file.

Backwards-compatibility functions

int rdfGetValue (RdfDescription *desc, const char *property, RdfNamespace *ns, char **value, RdfElement **element)
 Returns the element or its value with the specified name in a Description. More...

RdfElementrdfSetValue (RdfDescription *desc, const char *property, RdfNamespace *ns, const char *value)
 Sets the value of a property in a description. More...


Functions

int rdfGetProperty (RdfElement *parent, const char *property, RdfNamespace *ns, char **value, RdfElement **element)
 Returns the element or its value with the specified name in a description or container. More...

RdfElementrdfSetProperty (RdfElement *parent, const char *property, RdfNamespace *ns, const char *value)
 Sets the value of a property in a description or container. More...

RdfElementrdfSetElement (RdfElement *parent, const char *property, RdfNamespace *ns, RdfElement *element)
 Sets the element of a property in a description or container. More...

void rdfRemoveProperty (RdfElement *parent, const char *property, RdfNamespace *ns)
 Removes a property from a description or container. More...

void rdfRemoveElement (RdfElement *element)
 Removes an element from a description or container. More...


Detailed Description

Property functions.

Id:
property.h,v 1.7 2001/09/20 22:47:28 chipx86 Exp
Copyright:
(C) 1999-2001 The GNUpdate Project.
This library is free software; you can redistribute it and/or modify it under the terms of the GNU Library General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version.

This library 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 Library General Public License for more details.

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


Function Documentation

int rdfGetProperty RdfElement   parent,
const char *    property,
RdfNamespace   ns,
char **    value,
RdfElement **    element
 

Returns the element or its value with the specified name in a description or container.

To retrieve only the property's value, pass a pointer to a string for value and NULL for element.

Likewise, you can retrieve only the element by passing a pointer to a pointer of an RdfElement for element and NULL for value.

If you wish to retrieve both the value and the element, pass a pointer to a string for value and a pointer to a pointer of an RdfElement to element.

Parameters:
parent   The description or container containing the property.
property   The name of the property to retrieve.
ns   The namespace of the property.
value   The returned value, unless NULL is specified.
element   The returned element, unless NULL is specified.
Returns:
RDF_BAG if the property is an <RDF:Bag>. RDF_SEQ if the property is an <RDF:Seq>. RDF_ALT if the property is an <RDF:Alt>. RDF_DESC if the property is an <RDF:Description>. 0 if the property is a normal property. -1 if not found.

int rdfGetValue RdfDescription   desc,
const char *    property,
RdfNamespace   ns,
char **    value,
RdfElement **    element
 

Returns the element or its value with the specified name in a Description.

Deprecated:
This function has been replaced with rdfGetProperty().
See also:
rdfGetProperty()

void rdfRemoveElement RdfElement   element
 

Removes an element from a description or container.

Parameters:
element   The element to remove.

void rdfRemoveProperty RdfElement   parent,
const char *    property,
RdfNamespace   ns
 

Removes a property from a description or container.

Parameters:
desc   The description or container which holds the property.
property   The property's name.
ns   The property's namespace.

RdfElement* rdfSetElement RdfElement   parent,
const char *    property,
RdfNamespace   ns,
RdfElement   element
 

Sets the element of a property in a description or container.

Parameters:
parent   The description or container which will hold the property.
property   The name of the property.
ns   The namespace of the property.
element   The property's element.
Returns:
The new property's element.
See also:
rdfSetProperty()

RdfElement* rdfSetProperty RdfElement   parent,
const char *    property,
RdfNamespace   ns,
const char *    value
 

Sets the value of a property in a description or container.

Parameters:
parent   The description or container which will hold the property.
property   The name of the property.
ns   The namespace of the property.
value   The property's value.
Returns:
The new property's element.
See also:
rdfSetElement()

RdfElement* rdfSetValue RdfDescription   desc,
const char *    property,
RdfNamespace   ns,
const char *    value
 

Sets the value of a property in a description.

Deprecated:
This function has been replaced with rdfSetProperty().
See also:
rdfSetProperty()


Generated on Thu Sep 20 16:12:08 2001 for libgnurdf by doxygen1.2.9-20010819 written by Dimitri van Heesch, © 1997-2001