Study your flashcards anywhere!

Download the official Cram app for free >

  • Shuffle
    Toggle On
    Toggle Off
  • Alphabetize
    Toggle On
    Toggle Off
  • Front First
    Toggle On
    Toggle Off
  • Both Sides
    Toggle On
    Toggle Off
  • Read
    Toggle On
    Toggle Off
Reading...
Front

How to study your flashcards.

Right/Left arrow keys: Navigate between flashcards.right arrow keyleft arrow key

Up/Down arrow keys: Flip the card between the front and back.down keyup key

H key: Show hint (3rd side).h key

A key: Read text to speech.a key

image

Play button

image

Play button

image

Progress

1/14

Click to flip

14 Cards in this Set

  • Front
  • Back
simplexml_import_dom
This function takes a node of a DOM document and makes it into a SimpleXML node. This new object can then be used as a native SimpleXML element.


(DOMNode $node [, string $class_name = "SimpleXMLElement" ] )


Returns a SimpleXMLElement or FALSE on failure.
simplexml_load_file
Convert the well-formed XML document in the given file to an object.


( string $filename [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns [, bool $is_prefix = false ]]]] )


Returns an object of class SimpleXMLElement with properties containing the data held within the XML document. On errors, it will return FALSE.
simplexml_load_string
Takes a well-formed XML string and returns it as an object.


( string $data [, string $class_name = "SimpleXMLElement" [, int $options = 0 [, string $ns [, bool $is_prefix = false ]]]] )


Returns an object of class SimpleXMLElement with properties containing the data held within the xml document. On errors, it will return FALSE.
SimpleXMLElement::addAttribute
Adds an attribute to the SimpleXML element.


( string $name , string $value [, string $namespace ] )


No value is returned.
SimpleXMLElement::addChild
Adds a child element to the node and returns a SimpleXMLElement of the child.


( string $name [, string $value [, string $namespace ]] )


The addChild method returns a SimpleXMLElement object representing the child added to the XML node.
SimpleXMLElement::asXML
The asXML method formats the parent object's data in XML version 1.0.


([ string $filename ] )


If the filename isn't specified, this function returns a string on success and FALSE on error. If the parameter is specified, it returns TRUE if the file was written successfully and FALSE otherwise.
SimpleXMLElement::attributes
This function provides the attributes and values defined within an xml tag.


([ string $ns [, bool $is_prefix ]] )
SimpleXMLElement::children
This method finds the children of the element of which it is a member. The result follows normal iteration rules.


([ string $ns [, bool $is_prefix ]] )
SimpleXMLElement::__construct
Creates a new SimpleXMLElement object.


( string $data [, int $options [, bool $data_is_url [, string $ns [, bool $is_prefix ]]]] )


Returns a SimpleXMLElement object representing data .
SimpleXMLElement::getDocNamespaces
Returns namespaces declared in document


([ bool $recursive ] )


The getDocNamespaces method returns an array of namespace names with their associated URIs.
SimpleXMLElement::getName
Gets the name of the XML element.

The getName method returns as a string the name of the XML tag referenced by the SimpleXMLElement object.
SimpleXMLElement::getNamespaces
Returns namespaces used in document


([ bool $recursive ] )


The getNamespaces method returns an array of namespace names with their associated URIs.
SimpleXMLElement::registerXPathNamespace
Creates a prefix/ns context for the next XPath query. In particular, this is helpful if the provider of the given XML document alters the namespace prefixes. registerXPathNamespace will create a prefix for the associated namespace, allowing one to access nodes in that namespace without the need to change code to allow for the new prefixes dictated by the provider.


( string $prefix , string $ns )


Returns TRUE on success or FALSE on failure.
SimpleXMLElement::xpath
The xpath method searches the SimpleXML node for children matching the XPath path .


( string $path )


Returns an array of SimpleXMLElement objects or FALSE in case of an error.