PHP:
скопировать код в буфер обмена
скопировать код в буфер обмена
- $atom = new DOMDocument('1.0', 'UTF-8');
- $atom_entry = $atom->createElement('entry');
- $atom_entry->setAttribute('xmlns', 'http://www.w3.org/2005/Atom');
- $atom->appendChild($atom_entry);
- $atom_title = $atom->createElement('title');
- $atom_title->setAttribute('type', 'text');
- $atom_entry->appendChild($atom_title);
- $atom_title_content = $atom->createTextNode($subject);
- $atom_title->appendChild($atom_title_content);
- $atom_content = $atom->createElement('content');
- $atom_content->setAttribute('type', 'xhtml');
- $atom_entry_content=$atom->createTextNode($entry);
- $atom_content->appendChild($atom_entry_content);
- $atom_entry->appendChild($atom_content);
- $atomMessage = $atom->saveXML();