MCPcopy Create free account
hub / github.com/PlutoLang/Pluto / xml_encode

Function xml_encode

src/lxml.cpp:56–66  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54}
55
56static int xml_encode (lua_State *L) {
57 auto& root = *pluto_newclassinst(L, soup::UniquePtr<soup::XmlNode>);
58 check_xml(L, 1, root);
59 if (lua_istrue(L, 2)) {
60 pluto_pushstring(L, root->encodePretty());
61 }
62 else {
63 pluto_pushstring(L, root->encode());
64 }
65 return 1;
66}
67
68static void pushxmltag (lua_State *L, const soup::XmlTag& tag) {
69 lua_checkstack(L, 5);

Callers

nothing calls this directly

Calls 3

check_xmlFunction · 0.85
lua_istrueFunction · 0.85
pluto_pushstringFunction · 0.85

Tested by

no test coverage detected