A simple tag wrapping method for XML and HTML.
Project description
tag_wrap
A simple tag and attribute generation tool.
Purpose
Developed to simplify the generation of HTML and XML content.
Usage
Syntax: wrap(tag_name, optional_attribute1="here", optional_attributeN="here, content_to_be_wrapped)
You may specify any number of attributes and any number of items to wrap as well as nesting tags themselves.
Examples
import tag_wrap
HTML Paragraph
tag_wrap.wrap('p', "This is a paragraph.")
Produces:
<p>This is a paragraph.</p>
Nested HTML with attributes and a nested body
tag_wrap.wrap('html', lang="en-US", wrap('body', 'Body content here'))
Produces:
<html lang="en-US"><body>Body content here</body></html>
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
File details
Details for the file tag_wrap-1.0.6.tar.gz
.
File metadata
- Download URL: tag_wrap-1.0.6.tar.gz
- Upload date:
- Size: 2.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7327ce89d023b943cf5695609cd9b349223431651a578bfbb78e93c1579319bf |
|
MD5 | cdf98d45c683cc11a24c5f0b0443e22b |
|
BLAKE2b-256 | 3df9769190cfdb3c06640c12b7030567020b737138b98e21fdc4936e12fbc47f |