Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git a/doc/efun/xml_generate b/doc/efun/xml_generate
index d210d5e..5502f9c 100644
--- a/doc/efun/xml_generate
+++ b/doc/efun/xml_generate
@@ -5,74 +5,72 @@
string xml_generate(mixed *xml)
-BESCHREIBUNG
- Wandelt das uebergebene <xml>-Array in einen XML-konformen String um,
- sofern moeglich. Der <xml>-Parameter muss folgende Struktur haben:
+DESCRIPTION
+ Converts the given <xml> array into an XML conform string, if
+ possible. The <xml> argument array must have the following structure.
- Er muss Tag-Arrays mit folgenden drei Elementen enthalten:
+ It must contain tag arrays of three elements, with the following
+ indices:
string XML_TAG_NAME
- Der Name des XML-Tags.
+ The name of the XML tag.
mapping XML_TAG_ATTRIBUTES
- Alle Attribute dieses XML-Tags als ein Mapping mit dem
- jeweiligen Attributnamen als Schluessel und den Attributwert
- als der dazugehoerige String.
-
- Falls ein XML-Tag keine Attribute enthaelt, so ist dieses
- Element 0.
+ All attributes given to the XML tag as mapping where the key
+ is the attribute name and the value is its string value.
+
+ If the xml tag does not contain any attributes, this element
+ is set 0:
mixed * XML_TAG_CONTENTS
- Der Inhalt des XML-Tags als ein Array. Dieses Array kann
- entweder Strings (reine Zeichendaten) oder Arrays
- als weitere Tags enthalten, welche wiederum diese
- drei Elemente besitzen.
-
- Falls das XML-Tag nichts enthaelt, so ist dieses Element 0.
+ The contents of this xml tag as array. This array may
+ contain either strings, or arrays of sub-tags again with
+ three elements (see example)
- Falls der uebergebe Parameter nicht diese Struktur besitzt, so wird
- eine Fehlermeldung ausgegeben. Ansonsten ist ein gueltiger XML-String
- das Resultat.
+ If the xml tag does not contain anything, the element is
+ set 0.
- Diese Funktion ist nur verfuegbar, wenn der Driver mit Iksemel-
- Unterstuetzung compiliert wurde. In diesem Fall ist das Makro
- __XML_DOM__ definiert.
+ In case the parameter does not follow these rules, errors are raised.
+ The method returns a valid XML string otherwise.
+
+ The function is available only if the driver is compiled with Iksemel
+ support. In that case, __XML_DOM__ is defined.
-BEISPIELE
+EXAMPLES
xml_generate(({ "abc", 0, 0 })) -> "<abc/>"
xml_generate(({ "abc", ([ "xyz" : "cde" ]), 0 })) -> "<abc xyz="cde"/>"
- mixed* xml = ({ "buch"
- , ([ "sprache" : "deutsch" ])
- , ({ ({ "titel"
+ mixed *xml = ({ "book"
+ , ([ "language" : "common" ])
+ , ({ ({ "title"
, 0
- , ({ "Dies ist der Titel" })
+ , ({ "This is a title" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Dies ist ein Kapitel" })
+ , ({ "This is a chapter" })
})
- , ({ "kapitel"
+ , ({ "chapter"
, 0
- , ({ "Das soll "
+ , ({ "We want "
, ({ "b"
, 0
- , ({ "fettgedruckt" })
+ , ({ "bold" })
})
- , " sein."
+ , "here"
})
})
})
})
xml_generate(xml)
- -> "<buch sprache="deutsch"><titel>Dies ist der Titel</titel>"
- "<kapitel>Dies ist ein Kapitel</kapitel><kapitel>Das soll "
- "<b>fettgedruckt</b> sein.</kapitel></buch>"
+ -> "<book language="common"><title>This is the title</title>"
+ "<chapter>This is a chapter</chapter><chapter>We want "
+ "<b>bold</b> here.</chapter></book>"
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+HISTORY
+ Added in LDMud 3.3.718.
-SIEHE AUCH
+SEE ALSO
xml_parse(E)