SimpleXML
Tässä on erilaisia simpleXML funktiota/ komentoja!
Funktio | Selite | Esimerkki |
---|---|---|
__construct() | Creates a new SimpleXMLElement object | Esim |
addAttribute() | Adds an attribute to the SimpleXML element | Esim |
addChild() | Adds a child element the SimpleXML element | Esim |
asXML() | Returns a well-formed XML string (XML version 1.0) from a SimpleXML object | Esim |
attributes() | Returns the attributes/values of an element | Esim |
children() | Returns the children of a specified node | Esim |
count() | Counts the children of a specified node | Esim |
getDocNamespaces() | Returns the namespaces DECLARED in document | Esim |
getName() | Returns the name of the XML tag referenced by the SimpleXML element | Esim |
getNamespaces() | Returns the namespaces USED in document | Esim |
registerXPathNamespace() | Creates a namespace context for the next XPath query | Esim |
saveXML() | Alias of asXML() | Esim |
simplexml_import_dom() | Returns a SimpleXMLElement object from a DOM node | Esim |
simplexml_load_file() | Converts an XML file into a SimpleXMLElement object | Esim |
simplexml_load_string() | Converts an XML string into a SimpleXMLElement object | Esim |
xpath() | Runs an XPath query on XML data | Esim |
Funktio | Selite | Esimerkki |
---|---|---|
current() | Returns the current element | Esim |
getChildren() | Returns the child elements of the current element | Esim |
hasChildren() | Checks whether the current element has children | Esim |
key() | Return the current key | Esim |
next() | Moves to the next element | Esim |
rewind() | Rewind to the first element | Esim |
valid() | Check whether the current element is valid | Esim |
XML
Tässä on erilaisia XML funktiota/ komentoja!
Funktio | Selite | PHP Versio | Esimerkki |
---|---|---|---|
utf8_decode() | Decodes an UTF-8 string to ISO-8859-1 | 3 | Esim |
utf8_encode() | Encodes an ISO-8859-1 string to UTF-8 | 3 | Esim |
xml_error_string() | Gets an error string from the XML parser | 3 | Esim |
xml_get_current_byte_index() | Gets the current byte index from the XML parser | 3 | Esim |
xml_get_current_column_number() | Gets the current column number from the XML parser | 3 | Esim |
xml_get_current_line_number() | Gets the current line number from the XML parser | 3 | Esim |
xml_get_error_code() | Gets an error code from the XML parser | 3 | Esim |
xml_parse() | Parses an XML document | 3 | Esim |
xml_parse_into_struct() | Parse XML data into an array | 3 | Esim |
xml_parser_create_ns() | Create an XML parser with namespace support | 4 | Esim |
xml_parser_create() | Create an XML parser | 3 | Esim |
xml_parser_free() | Free an XML parser | 3 | Esim |
xml_parser_get_option() | Get options from an XML parser | 3 | Esim |
xml_parser_set_option() | Set options in an XML parser | 3 | Esim |
xml_set_character_data_handler() | Set handler function for character data | 3 | Esim |
xml_set_default_handler() | Set default handler function | 3 | Esim |
xml_set_element_handler() | Set handler function for start and end element of elements | 3 | Esim |
xml_set_end_namespace_decl_handler() | Set handler function for the end of namespace declarations | 4 | Esim |
xml_set_external_entity_ref_handler() | Set handler function for external entities | 3 | Esim |
xml_set_notation_decl_handler() | Set handler function for notation declarations | 3 | Esim |
xml_set_object() | Use XML Parser within an object | 4 | Esim |
xml_set_processing_instruction_handler() | Set handler function for processing instruction | 3 | Esim |
xml_set_start_namespace_decl_handler() | Set handler function for the start of namespace declarations | 4 | Esim |
xml_set_unparsed_entity_decl_handler() | Set handler function for unparsed entity declarations | 3 | Esim |
Funktio | Esimerkki |
---|---|
XML_ERROR_NONE (integer) | Esim |
XML_ERROR_NO_MEMORY (integer) | Esim |
XML_ERROR_SYNTAX (integer) | Esim |
XML_ERROR_NO_ELEMENTS (integer) | Esim |
XML_ERROR_INVALID_TOKEN (integer) | Esim |
XML_ERROR_UNCLOSED_TOKEN (integer) | Esim |
XML_ERROR_PARTIAL_CHAR (integer) | Esim |
XML_ERROR_TAG_MISMATCH (integer) | Esim |
XML_ERROR_DUPLICATE_ATTRIBUTE (integer) | Esim |
XML_ERROR_JUNK_AFTER_DOC_ELEMENT (integer) | Esim |
XML_ERROR_PARAM_ENTITY_REF (integer) | Esim |
XML_ERROR_UNDEFINED_ENTITY (integer) | Esim |
XML_ERROR_RECURSIVE_ENTITY_REF (integer) | Esim |
XML_ERROR_ASYNC_ENTITY (integer) | Esim |
XML_ERROR_BAD_CHAR_REF (integer) | Esim |
XML_ERROR_BINARY_ENTITY_REF (integer) | Esim |
XML_ERROR_ATTRIBUTE_EXTERNAL_ENTITY_REF (integer) | Esim |
XML_ERROR_MISPLACED_XML_PI (integer) | Esim |
XML_ERROR_UNKNOWN_ENCODING (integer) | Esim |
XML_ERROR_INCORRECT_ENCODING (integer) | Esim |
XML_ERROR_UNCLOSED_CDATA_SECTION (integer) | Esim |
XML_ERROR_EXTERNAL_ENTITY_HANDLING (integer) | Esim |
XML_OPTION_CASE_FOLDING (integer) | Esim |
XML_OPTION_TARGET_ENCODING (integer) | Esim |
XML_OPTION_SKIP_TAGSTART (integer) | Esim |
XML_OPTION_SKIP_WHITE (integer) | Esim |