Object XmlToolkit

  • All Implemented Interfaces:

    
    public class XmlToolkit
    
                        
    Author:

    Toutatis_Gc

    • Nested Class Summary

      Nested Classes 
      Modifier and Type Class Description
    • Field Summary

      Fields 
      Modifier and Type Field Description
      public final static XmlToolkit INSTANCE
    • Constructor Summary

      Constructors 
      Constructor Description
    • Enum Constant Summary

      Enum Constants 
      Enum Constant Description
    • Method Summary

      Modifier and Type Method Description
      final static JSONObject xmlToMap(String xml)
      final static String mapToXml(JSONObject data) 将Map转换为XML格式的字符串
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

    • Method Detail

      • xmlToMap

         final static JSONObject xmlToMap(String xml)
        Parameters:
        xml - xml字符串
        Returns:

        xml转换为JsonObject

      • mapToXml

         final static String mapToXml(JSONObject data)

        将Map转换为XML格式的字符串

        Parameters:
        data - Map类型数据
        Returns:

        XML格式的字符串