touv/ATOMWriter
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Folders and files
Name | Name | Last commit message | Last commit date | |
---|---|---|---|---|
Repository files navigation
Exemple : $xmlWriter = new XMLWriter(); $xmlWriter->openUri('php://output'); $xmlWriter->setIndent(true); $f = new ATOMWriter($xmlWriter, true); $f->startFeed('urn:tps:com-idx') ->writeStartIndex(1) ->writeItemsPerPage(10) ->writeTotalResults(100) ->writeTitle('Index of /') ->writeLink('http://exemple.com/', 'text/xml'); $f->startEntry('urn:tps:com-idx-1') ->writeTitle('Data 1') ->writeLink('/1.xml', 'text/xml') ->writeLink('/1.txt', 'text/plain') ->writeContent('Un', 'text', 'fr') ->writeCategory('term', '#scheme') ->endEntry(); $f->flush(); $f->startEntry('urn:tps:com-idx-2') ->writeTitle('Data 2') ->writeLink('2.txt', 'text/plain') ->writeContent('deux', 'text', 'fr') ->endEntry(); $f->flush(); $f->endFeed(); $f->flush();
About
No description, website, or topics provided.
Resources
License
Stars
Watchers
Forks
Packages 0
No packages published