Metadata-Version: 2.1
Name: sgml2dict
Version: 0.0.5
Summary: Convert SGML text to dictionary.
Project-URL: Homepage, https://gitlab.com/dhbmarcos/sgml2dict
Author-email: "D. H. B. Marcos" <dhbmarcos@gmail.com>
License-File: LICENSE
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python :: 3
Requires-Python: >=3.7
Description-Content-Type: text/markdown

# sgml2dict

Convert SGML text to dictionary.

## API

### Initiate

```py
import sgml2dict
```

### convert(text)

parameter
- text: SGML text

return: dict

```py
import sgml2dict
result = sgml2dict.convert("<hello world/></hello>")
```

## Example

```py
import json
import sgml2dict

text = "<hello world/></hello>"
data = sgml2dict.convert(text)

print("Dictionary view:", data)
print("JSON view:", json.dumps(data))
```

Return:
```
Dictionary view: {'name': 'hello', 'attributes': {'world': True}}
JSON view: {"name": "hello", "attributes": {"world": true}}
```

## Support

https://gitlab.com/dhbmarcos/sgml2dict

## License

 - MIT License
 - Copyright (c) 2023 D. H. B. Marcos. All rights reserved.
