2000-09-15 19:56:39 +00:00
|
|
|
<?xml version="1.0"?>
|
|
|
|
<!DOCTYPE gsdoc PUBLIC "-//GNUstep//DTD gsdoc 0.6.6//EN" "http://www.gnustep.org/gsdoc-0_6_6.xml">
|
|
|
|
<gsdoc base="GSXMLAttribute" next="GSXMLDocument" up="GSXML" prev="GSXMLNode">
|
|
|
|
<head>
|
|
|
|
<title>GSXMLAttribute</title>
|
|
|
|
<author name="Michael Pakhantsov">
|
|
|
|
<email address="mishel@berest.dp.ua"/>
|
|
|
|
</author>
|
|
|
|
<author name="Richard Frith-Macdonald">
|
|
|
|
<email address="rfm@gnu.org"/>
|
|
|
|
</author>
|
2001-03-03 09:58:53 +00:00
|
|
|
<version>$Revision$</version>
|
2001-03-03 09:56:29 +00:00
|
|
|
<date>$Date$</date>
|
2000-09-15 19:56:39 +00:00
|
|
|
</head>
|
|
|
|
|
|
|
|
<body>
|
|
|
|
<chapter>
|
|
|
|
<heading>GSXMLAttribute</heading>
|
|
|
|
<class name="GSXMLAttribute" super="GSXMLNode">
|
|
|
|
<declared>GSXML.h</declared>
|
|
|
|
<desc>
|
|
|
|
XML Attribute.
|
|
|
|
</desc>
|
|
|
|
|
|
|
|
<method type="GSXMLAttribute*" factory="yes">
|
|
|
|
<sel>attributeWithNode:</sel>
|
|
|
|
<arg type="GSXMLNode*">node</arg>
|
|
|
|
<sel>name:</sel>
|
|
|
|
<arg type="NSString*">name</arg>
|
|
|
|
<sel>value:</sel>
|
|
|
|
<arg type="NSString*">value</arg>
|
|
|
|
<desc>
|
|
|
|
<p>Create a new property carried by a node.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
2001-04-25 14:06:40 +00:00
|
|
|
<method type="NSString*" factory="yes">
|
|
|
|
<sel>descriptionFromType:</sel>
|
|
|
|
<arg type="int">type</arg>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Return the string constant value for the attribute
|
|
|
|
type given.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="int" factory="yes">
|
|
|
|
<sel>typeFromDescription:</sel>
|
|
|
|
<arg type="NSString*">desc</arg>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Return the numeric constant value for the attribute
|
|
|
|
type named. This method is inefficient, so the returned
|
|
|
|
value should be saved for re-use later. The possible
|
|
|
|
values are -
|
|
|
|
</p>
|
|
|
|
<list>
|
|
|
|
<item>XML_ATTRIBUTE_CDATA</item>
|
|
|
|
<item>XML_ATTRIBUTE_ID</item>
|
|
|
|
<item>XML_ATTRIBUTE_IDREF </item>
|
|
|
|
<item>XML_ATTRIBUTE_IDREFS</item>
|
|
|
|
<item>XML_ATTRIBUTE_ENTITY</item>
|
|
|
|
<item>XML_ATTRIBUTE_ENTITIES</item>
|
|
|
|
<item>XML_ATTRIBUTE_NMTOKEN</item>
|
|
|
|
<item>XML_ATTRIBUTE_NMTOKENS</item>
|
|
|
|
<item>XML_ATTRIBUTE_ENUMERATION</item>
|
|
|
|
<item>XML_ATTRIBUTE_NOTATION</item>
|
|
|
|
</list>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
2000-09-15 19:56:39 +00:00
|
|
|
<method type="id" >
|
|
|
|
<sel>initWithNode:</sel>
|
|
|
|
<arg type="GSXMLNode*">node</arg>
|
|
|
|
<sel>name:</sel>
|
|
|
|
<arg type="NSString*">name</arg>
|
|
|
|
<sel>value:</sel>
|
|
|
|
<arg type="NSString*">value</arg>
|
|
|
|
<desc>
|
|
|
|
<p>Create a new property carried by a node.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="GSXMLAttribute*" factory="yes">
|
|
|
|
<sel>attributeFrom:</sel>
|
|
|
|
<arg type="void*">data</arg>
|
|
|
|
<desc>
|
|
|
|
<p>Creation of a new Attribute from libxml data.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="id" init="yes">
|
|
|
|
<sel>initFrom:</sel>
|
|
|
|
<arg type="void*">data</arg>
|
|
|
|
<desc>
|
|
|
|
<p>Creation of a new Attribute from libxml data.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="void*" >
|
|
|
|
<sel>lib</sel>
|
|
|
|
<desc>
|
|
|
|
<p>Return pointer to xmlAttribute structure.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="NSString*" >
|
|
|
|
<sel>name</sel>
|
|
|
|
<desc>
|
|
|
|
<p>Return a Attribute name.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="NSString*" >
|
|
|
|
<sel>value</sel>
|
|
|
|
<desc>
|
|
|
|
<p>Return a value of this attribute.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="GSXMLAttribute*" >
|
|
|
|
<sel>next</sel>
|
|
|
|
<desc>
|
|
|
|
<p>Return next Attribute.
|
|
|
|
</p>
|
|
|
|
<example>
|
|
|
|
|
|
|
|
id a = [node properties];
|
|
|
|
NSLog(@"n1 property name - %@ value - %@", [a name], [a value]);
|
|
|
|
while ((a = [a next]) != nil)
|
|
|
|
{
|
|
|
|
NSLog(@"n1 property name - %@ value - %@", [a name], [a value]);
|
|
|
|
}
|
|
|
|
|
|
|
|
</example>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="GSXMLAttribute*" >
|
|
|
|
<sel>prev</sel>
|
|
|
|
<desc>
|
2001-04-25 14:06:40 +00:00
|
|
|
<p>
|
|
|
|
Return previous Attribute.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
|
|
|
<method type="int" >
|
|
|
|
<sel>type</sel>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Return the numeric type code for this attribute.
|
2000-09-15 19:56:39 +00:00
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
2001-04-25 14:06:40 +00:00
|
|
|
|
|
|
|
<method type="NSString*" >
|
|
|
|
<sel>typeDescription</sel>
|
|
|
|
<desc>
|
|
|
|
<p>
|
|
|
|
Return the string type code for this attribute.
|
|
|
|
</p>
|
|
|
|
</desc>
|
|
|
|
</method>
|
|
|
|
|
2000-09-15 19:56:39 +00:00
|
|
|
</class>
|
|
|
|
</chapter>
|
|
|
|
</body>
|
|
|
|
</gsdoc>
|
|
|
|
|