| Copyright | Will Thompson Iñaki García Etxebarria and Jonas Platte |
|---|---|
| License | LGPL-2.1 |
| Maintainer | Iñaki García Etxebarria |
| Safe Haskell | None |
| Language | Haskell2010 |
GI.IBus.Structs.XML
Description
IBusXML lists data structure and handling function for XML in IBus.
Synopsis
- newtype XML = XML (ManagedPtr XML)
- newZeroXML :: MonadIO m => m XML
- xMLCopy :: (HasCallStack, MonadIO m) => XML -> m XML
- xMLFree :: (HasCallStack, MonadIO m) => XML -> m ()
- xMLOutput :: (HasCallStack, MonadIO m) => XML -> String -> m ()
- xMLParseBuffer :: (HasCallStack, MonadIO m) => Text -> m XML
- xMLParseFile :: (HasCallStack, MonadIO m) => Text -> m XML
- clearXMLAttributes :: MonadIO m => XML -> m ()
- getXMLAttributes :: MonadIO m => XML -> m (Maybe Text)
- setXMLAttributes :: MonadIO m => XML -> CString -> m ()
- clearXMLName :: MonadIO m => XML -> m ()
- getXMLName :: MonadIO m => XML -> m (Maybe Text)
- setXMLName :: MonadIO m => XML -> CString -> m ()
- clearXMLSubNodes :: MonadIO m => XML -> m ()
- getXMLSubNodes :: MonadIO m => XML -> m [Ptr ()]
- setXMLSubNodes :: MonadIO m => XML -> Ptr (GList (Ptr ())) -> m ()
- clearXMLText :: MonadIO m => XML -> m ()
- getXMLText :: MonadIO m => XML -> m (Maybe Text)
- setXMLText :: MonadIO m => XML -> CString -> m ()
Exported types
Memory-managed wrapper type.
Instances
| Eq XML Source # | |
| GBoxed XML Source # | |
Defined in GI.IBus.Structs.XML | |
| ManagedPtrNewtype XML Source # | |
Defined in GI.IBus.Structs.XML Methods toManagedPtr :: XML -> ManagedPtr XML | |
| TypedObject XML Source # | |
Defined in GI.IBus.Structs.XML Methods glibType :: IO GType | |
| IsGValue XML Source # | Convert |
Defined in GI.IBus.Structs.XML | |
| HasParentTypes XML Source # | |
Defined in GI.IBus.Structs.XML | |
| tag ~ 'AttrSet => Constructible XML tag Source # | |
| type ParentTypes XML Source # | |
Defined in GI.IBus.Structs.XML type ParentTypes XML = '[] :: [Type] | |
Methods
Overloaded methods
copy
Arguments
| :: (HasCallStack, MonadIO m) | |
| => XML |
|
| -> m XML | Returns: the newly allocated |
Creates a copy of node, which should be freed with
xMLFree. Primarily used by language bindings,
not that useful otherwise (since node can just be copied
by assignment in C).
free
Free an XML tree.
output
Arguments
| :: (HasCallStack, MonadIO m) | |
| => XML |
|
| -> String |
|
| -> m () |
Output an XML tree to a GString.
parseBuffer
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m XML | Returns: Root node of parsed XML tree. |
Parse a string buffer which contains an XML-formatted string, and return a corresponding XML tree.
parseFile
Arguments
| :: (HasCallStack, MonadIO m) | |
| => Text |
|
| -> m XML | Returns: Root node of parsed XML tree. |
Parse an XML file and return a corresponding XML tree.
Properties
attributes
Attributes of the XML node.
clearXMLAttributes :: MonadIO m => XML -> m () Source #
Set the value of the “attributes” field to Nothing.
When overloading is enabled, this is equivalent to
clear #attributes
getXMLAttributes :: MonadIO m => XML -> m (Maybe Text) Source #
Get the value of the “attributes” field.
When overloading is enabled, this is equivalent to
get xML #attributes
setXMLAttributes :: MonadIO m => XML -> CString -> m () Source #
Set the value of the “attributes” field.
When overloading is enabled, this is equivalent to
setxML [ #attributes:=value ]
name
Name of XML tag.
clearXMLName :: MonadIO m => XML -> m () Source #
Set the value of the “name” field to Nothing.
When overloading is enabled, this is equivalent to
clear #name
getXMLName :: MonadIO m => XML -> m (Maybe Text) Source #
Get the value of the “name” field.
When overloading is enabled, this is equivalent to
get xML #name
setXMLName :: MonadIO m => XML -> CString -> m () Source #
Set the value of the “name” field.
When overloading is enabled, this is equivalent to
setxML [ #name:=value ]
subNodes
Children node of this XML node.
clearXMLSubNodes :: MonadIO m => XML -> m () Source #
Set the value of the “sub_nodes” field to Nothing.
When overloading is enabled, this is equivalent to
clear #subNodes
getXMLSubNodes :: MonadIO m => XML -> m [Ptr ()] Source #
Get the value of the “sub_nodes” field.
When overloading is enabled, this is equivalent to
get xML #subNodes
setXMLSubNodes :: MonadIO m => XML -> Ptr (GList (Ptr ())) -> m () Source #
Set the value of the “sub_nodes” field.
When overloading is enabled, this is equivalent to
setxML [ #subNodes:=value ]
text
Text enclosed by XML start tag and end tag. i.e. <tag>text</tag>.
clearXMLText :: MonadIO m => XML -> m () Source #
Set the value of the “text” field to Nothing.
When overloading is enabled, this is equivalent to
clear #text
getXMLText :: MonadIO m => XML -> m (Maybe Text) Source #
Get the value of the “text” field.
When overloading is enabled, this is equivalent to
get xML #text
setXMLText :: MonadIO m => XML -> CString -> m () Source #
Set the value of the “text” field.
When overloading is enabled, this is equivalent to
setxML [ #text:=value ]