https://github.com/artem14133q/sxml
A simple php library for manage xml/html documents.
https://github.com/artem14133q/sxml
html library php php8 php81 xml
Last synced: 5 months ago
JSON representation
A simple php library for manage xml/html documents.
- Host: GitHub
- URL: https://github.com/artem14133q/sxml
- Owner: artem14133q
- License: mit
- Created: 2023-10-23T09:23:17.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2024-02-02T10:34:55.000Z (over 2 years ago)
- Last Synced: 2025-06-05T15:46:11.859Z (about 1 year ago)
- Topics: html, library, php, php8, php81, xml
- Language: PHP
- Homepage:
- Size: 33.2 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
Awesome Lists containing this project
README
# SXML
A simple php library for manage xml/html documents.
## Php version
`^8.1`
## Installation
`composer require artem14133q/sxml`
## Usage
```php
use Sxml\Documents\HtmlDocument;
$html = "
Document
Hello World!
";
$doc = HtmlDocument($html);
$body = $doc->getHtmlNode()->findByName("body")[0];
$div = $body->findByName("div")[0];
$div->setValue("Hello SXML!");
$doc->writer->asText();
```
Input:
```html
Document
Hello SXML!
```
## License
`MIT`