| 929 | } |
| 930 | |
| 931 | static void writeMethodElement(XMLWriter& writer, const std::string& tagname, const Method& method) |
| 932 | { |
| 933 | writer.startElement("", "", tagname); |
| 934 | if (!method.m_command.empty()) |
| 935 | { |
| 936 | writer.startElement("", "", CommandElement); |
| 937 | writer.characters(ucr::toUTF8(method.m_command)); |
| 938 | writer.endElement("", "", CommandElement); |
| 939 | } |
| 940 | if (method.m_script) |
| 941 | { |
| 942 | AttributesImpl attrs; |
| 943 | if (!method.m_script->m_fileExtension.empty()) |
| 944 | attrs.addAttribute("", "", FileExtensionAttribute, "", ucr::toUTF8(method.m_script->m_fileExtension)); |
| 945 | writer.startElement("", "", ScriptElement, attrs); |
| 946 | writer.characters(ucr::toUTF8(method.m_script->m_body)); |
| 947 | writer.endElement("", "", ScriptElement); |
| 948 | } |
| 949 | writer.endElement("", "", tagname); |
| 950 | } |
| 951 | |
| 952 | bool SaveToXML(LocationType locationType, const std::list<Info>& internalPlugins, String& errmsg) |
| 953 | { |
no test coverage detected