## Class processing_instruction

zeep::xml::processing_instruction — A node containing a XML processing instruction (like e.g. <?php ?>)

## Synopsis

    // In header: <zeep/xml/node.hpp>

    class processing_instruction : public zeep::xml::node_with_text {
    public:
      // construct/copy/destruct
      processing_instruction();
      processing_instruction(processing_instruction &&) noexcept;
      processing_instruction(const std::string &, const std::string &);

      // public member functions
      virtual std::string get_qname() const;
      std::string get_target() const;
      void set_target(const std::string &);
      virtual bool equals(const node *) const;
      virtual node * clone() const;
      virtual node * move();

      // protected member functions
      virtual void write(std::ostream &, format_info) const;
    };

## Description

### `processing_instruction` public construct/copy/destruct

1.     processing_instruction();

2.     processing_instruction(processing_instruction && pi) noexcept;

3.     processing_instruction(const std::string & target, const std::string & text);

   constructor with parameters

   This constructs a processing instruction with the specified parameters

   Parameters:

   `target` | The target, this will follow the <? characters, e.g. `php` will generate <?php ... ?>
   `text` | The text inside this node, e.g. the PHP code.

### `processing_instruction` public member functions

1.     virtual std::string get_qname() const;

   return the qname which is the same as the target in this case

2.     std::string get_target() const;

   return the target

3.     void set_target(const std::string & target);

   set the target

4.     virtual bool equals(const node * n) const;

   compare nodes for equality

5.     virtual node * clone() const;

   return an exact copy of this node, including all data in sub nodes

6.     virtual node * move();

   return a copy of this node, including all data in sub nodes, but in contrast with clone the data is moved from this node to the cloned node. This node will be empty afterwards.

### `processing_instruction` protected member functions

1.     virtual void write(std::ostream & os, format_info fmt) const;

   low level routine for writing out XML

   This method is usually called by operator<<(std::ostream&, zeep::xml::document&)