Linux cesa-www-main 6.1.0-49-cloud-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.174-1 (2026-05-26) x86_64
Apache/2.4.68 (Debian)
Server IP : 10.218.0.2 & Your IP : 216.73.216.28
Domains :
Cant Read [ /etc/named.conf ]
User : www-data
Terminal
Auto Root
Create File
Create Folder
Localroot Suggester
Backdoor Destroyer
Readme
/
var /
www /
cesa.co.za /
vendor /
theseer /
tokenizer /
src /
Delete
Unzip
Name
Size
Permission
Date
Action
Exception.php
102
B
-rw-r--r--
2025-11-17 20:03
NamespaceUri.php
595
B
-rw-r--r--
2025-11-17 20:03
NamespaceUriException.php
113
B
-rw-r--r--
2025-11-17 20:03
Token.php
644
B
-rw-r--r--
2025-11-17 20:03
TokenCollection.php
1.96
KB
-rw-r--r--
2025-11-17 20:03
TokenCollectionException.php
116
B
-rw-r--r--
2025-11-17 20:03
Tokenizer.php
3.57
KB
-rw-r--r--
2025-11-17 20:03
XMLSerializer.php
2.15
KB
-rw-r--r--
2025-11-17 20:03
Save
Rename
<?php declare(strict_types = 1); namespace TheSeer\Tokenizer; use DOMDocument; class XMLSerializer { /** @var NamespaceUri */ private $xmlns; /** * XMLSerializer constructor. * * @param NamespaceUri $xmlns */ public function __construct(?NamespaceUri $xmlns = null) { if ($xmlns === null) { $xmlns = new NamespaceUri('https://github.com/theseer/tokenizer'); } $this->xmlns = $xmlns; } public function toDom(TokenCollection $tokens): DOMDocument { $dom = new DOMDocument(); $dom->preserveWhiteSpace = false; $dom->loadXML($this->toXML($tokens)); return $dom; } public function toXML(TokenCollection $tokens): string { $writer = new \XMLWriter(); $writer->openMemory(); $writer->setIndent(true); $writer->startDocument(); $writer->startElement('source'); $writer->writeAttribute('xmlns', $this->xmlns->asString()); if (\count($tokens) > 0) { $writer->startElement('line'); $writer->writeAttribute('no', '1'); $iterator = $tokens->getIterator(); $previousToken = $iterator->current(); $previousLine = $previousToken->getLine(); foreach ($iterator as $token) { $line = $token->getLine(); if ($previousLine < $line) { $writer->endElement(); $writer->startElement('line'); $writer->writeAttribute('no', (string)$line); $previousLine = $line; } $value = $token->getValue(); if ($value !== '') { $writer->startElement('token'); $writer->writeAttribute('name', $token->getName()); $writer->writeRaw(\htmlspecialchars($value, \ENT_NOQUOTES | \ENT_DISALLOWED | \ENT_XML1)); $writer->endElement(); } } $writer->endElement(); } $writer->endElement(); $writer->endDocument(); return $writer->outputMemory(); } }