Update doc/efun/ aus Driversourcen.
Manpages der efuns aktualisiert, neue Manpages hinzugefuegt.
Change-Id: I7cc91684269ff56d1aef47d5c5e7c87f7fd531dc
diff --git a/doc/efun/xml_parse b/doc/efun/xml_parse
index 130063b..8c243fc 100644
--- a/doc/efun/xml_parse
+++ b/doc/efun/xml_parse
@@ -3,77 +3,75 @@
SYNOPSIS
#include <xml.h>
- mixed* xml_parse(string xml)
+ mixed * xml_parse(string xml)
-BESCHREIBUNG
- Parst den angegebenen String <xml> als XML. Der String darf nur ein
- einziges Root-Tag enthalten, weitere Root-Tags werden ignoriert.
+DESCRIPTION
+ Parses the given string <xml> as a XML conform string. The string must
+ have only one root tag, subsequent root tags are ignored.
- Falls der String XML-konform war, so wird ein Array mit drei Elementen
- zurueckgegeben, dessen Elemente folgendermassen definiert sind:
+ If the xml string is correct, an array is of three elements is
+ returned, where as the following indices are defined:
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 XML-String nicht wohlgeformt ist oder falls nicht genug
- Speicher zur Verfuegung steht, wird eine Fehlermeldung ausgegeben.
+ 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.
+ If the XML string is not well formed, or there is not enough memory to
+ parse the whole XML structure into the array an error is raised.
+
+ The function is available only if the driver is compiled with Iksemel
+ support. In that case, __XML_DOM__ is defined.
-BEISPIELE
+EXAMPLES
xml_parse("<abc/>") -> ({ "abc", 0, 0 })
xml_parse("<abc xyz="cde"/>") -> ({ "abc", ([ "xyz" : "cde" ]), 0 })
- xml_parse("<buch sprache="deutsch">" +
- " <titel>Dies ist der Titel</titel>" +
- " <kapitel>Dies ist ein Kapitel</kapitel>" +
- " <kapitel>Das soll <b>fettgedruckt</b> sein.</kapitel>" +
- "</buch>")
+ xml_parse("<book language="common">" +
+ " <title>This is the title</title>" +
+ " <chapter>This is a chapter</chapter>" +
+ " <chapter>We want <b>bold</b> here.</chapter>" +
+ "</book>")
- -> ({ "buch"
- , ([ "sprache" : "deutsch" ])
- , ({ ({ "titel"
+ -> ({ "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
- , ({ "Dies soll "
+ , ({ "We want "
, ({ "b"
, 0
- , ({ "fettgedruckt" })
+ , ({ "bold" })
})
- , "sein."
+ , "here"
})
})
})
})
-GESCHICHTE
- Eingefuehrt in LDMud 3.3.718.
+HISTORY
+ Added in LDMud 3.3.718.
-SIEHE AUCH
+SEE ALSO
xml_generate(E)