Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add child with end tag #167

Closed
evanxlh opened this issue Dec 23, 2019 · 1 comment
Closed

Add child with end tag #167

evanxlh opened this issue Dec 23, 2019 · 1 comment

Comments

@evanxlh
Copy link

evanxlh commented Dec 23, 2019

How to add child with end tag?

eg. I want to add Category node, and also end with .

<root>
<Category name: 'category'></Category>
</root>
@tadija
Copy link
Owner

tadija commented Sep 19, 2020

it seems that you need to have a value for this node in order to generate the end tag too:

let doc = AEXMLDocument()
doc.addChild(name: "Category", value: "Test")
print(doc.xml) // <Category>Test</Category>

@tadija tadija closed this as completed Sep 19, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants