PHPackages                             yyxx9988/html-wxml-converter - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. yyxx9988/html-wxml-converter

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

yyxx9988/html-wxml-converter
============================

A PHP library that can convert html into wxml and back.

v1.0.0(9y ago)7262[1 PRs](https://github.com/yyxx9988/html-wxml-converter/pulls)MITPHP

Since Mar 12Pushed 7y ago1 watchersCompare

[ Source](https://github.com/yyxx9988/html-wxml-converter)[ Packagist](https://packagist.org/packages/yyxx9988/html-wxml-converter)[ RSS](/packages/yyxx9988-html-wxml-converter/feed)WikiDiscussions master Synced 4w ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

Html-Wxml Converter
===================

[](#html-wxml-converter)

A PHP library that can convert html into wxml and back.

Requirement
===========

[](#requirement)

- PHP &gt;= 5.4

Installation
============

[](#installation)

```
$ composer require "yyxx9988/html-wxml-converter"
```

Usage
=====

[](#usage)

```
use \yyxx9988\mlconverter\Converter;

$converter = new Converter();

$converter->setHtml('

    ...

');

echo $converter->convert();

// result

    ...

```

Customize
=========

[](#customize)

- Default supported tags

```
[
    'p' => 'view',
    'h1' => 'view',
    'h2' => 'view',
    'h3' => 'view',
    'h4' => 'view',
    'h5' => 'view',
    'h6' => 'view',
    'ul' => 'view',
    'ol' => 'view',
    'li' => 'view',
    'div' => 'view',
    'nav' => 'view',
    'pre' => 'view',
    'code' => 'view',
    'menu' => 'view',
    'aside' => 'view',
    'header' => 'view',
    'footer' => 'view',
    'legend' => 'view',
    'section' => 'view',
    'article' => 'view',
    'caption' => 'view',
    'details' => 'view',
    'summary' => 'view',
    'menuitem' => 'view',
    'blockquote' => 'view',

    'i' => 'text',
    'b' => 'text',
    's' => 'text',
    'u' => 'text',
    'big' => 'text',
    'del' => 'text',
    'sub' => 'text',
    'sup' => 'text',
    'ins' => 'text',
    'font' => 'text',
    'mark' => 'text',
    'time' => 'text',
    'span' => 'text',
    'center' => 'text',
    'strong' => 'text',
    'strike' => 'text',
];
```

- Customize special tags

```
$converter = new Converter();

// add a tag
$converter->addHtmlTags('xxx', 'view');

// change a tag
$converter->setHtmlTags('li', 'text');

// remove a tag
$converter->removeHtmlTags('article');

echo $converter->convert();
```

License
=======

[](#license)

MIT

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

3396d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/13196890?v=4)[Ruitang Du](/maintainers/yyxx9988)[@yyxx9988](https://github.com/yyxx9988)

---

Top Contributors

[![yyxx9988](https://avatars.githubusercontent.com/u/13196890?v=4)](https://github.com/yyxx9988 "yyxx9988 (1 commits)")

---

Tags

converterhtmlwxmlhtmlconverterwxml

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/yyxx9988-html-wxml-converter/health.svg)

```
[![Health](https://phpackages.com/badges/yyxx9988-html-wxml-converter/health.svg)](https://phpackages.com/packages/yyxx9988-html-wxml-converter)
```

###  Alternatives

[caxy/php-htmldiff

A library for comparing two HTML files/snippets and highlighting the differences using simple HTML.

21421.8M20](/packages/caxy-php-htmldiff)[matthiasmullie/path-converter

Relative path converter

10231.2M8](/packages/matthiasmullie-path-converter)[magyarandras/amp-converter

A library to convert HTML articles, blog posts or similar content to AMP (Accelerated Mobile Pages).

65154.1k](/packages/magyarandras-amp-converter)[bicpi/html-converter

HTML-to-Text converter library

1220.7k1](/packages/bicpi-html-converter)[ph-7/html-to-text

Lightweight package to convert HTML code to plain text (handy for plain text email format).

128.8k5](/packages/ph-7-html-to-text)[thunderer/numbase

Convert any number between arbitrary bases

242.3k](/packages/thunderer-numbase)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
