diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/LLSDxmlEncode.cs | 31 |
1 files changed, 15 insertions, 16 deletions
diff --git a/OpenSim/Framework/LLSDxmlEncode.cs b/OpenSim/Framework/LLSDxmlEncode.cs index ac9b468..97b3ca1 100644 --- a/OpenSim/Framework/LLSDxmlEncode.cs +++ b/OpenSim/Framework/LLSDxmlEncode.cs | |||
@@ -315,13 +315,9 @@ namespace OpenSim.Framework | |||
315 | public static void AddRawElem(string e, StringBuilder sb) | 315 | public static void AddRawElem(string e, StringBuilder sb) |
316 | { | 316 | { |
317 | if(String.IsNullOrEmpty(e)) | 317 | if(String.IsNullOrEmpty(e)) |
318 | sb.Append("<string />"); | 318 | return; |
319 | else | 319 | |
320 | { | 320 | sb.Append(e); |
321 | sb.Append("<string>"); | ||
322 | sb.Append(e); | ||
323 | sb.Append("</string>"); | ||
324 | } | ||
325 | } | 321 | } |
326 | 322 | ||
327 | public static void AddElem(Uri e, StringBuilder sb) | 323 | public static void AddElem(Uri e, StringBuilder sb) |
@@ -652,18 +648,13 @@ namespace OpenSim.Framework | |||
652 | 648 | ||
653 | public static void AddRawElem(string name, string e, StringBuilder sb) | 649 | public static void AddRawElem(string name, string e, StringBuilder sb) |
654 | { | 650 | { |
651 | if (String.IsNullOrEmpty(e)) | ||
652 | return; | ||
653 | |||
655 | sb.Append("<key>"); | 654 | sb.Append("<key>"); |
656 | sb.Append(name); | 655 | sb.Append(name); |
657 | sb.Append("</key>"); | 656 | sb.Append("</key>"); |
658 | 657 | sb.Append(e); | |
659 | if(String.IsNullOrEmpty(e)) | ||
660 | sb.Append("<string />"); | ||
661 | else | ||
662 | { | ||
663 | sb.Append("<string>"); | ||
664 | sb.Append(e); | ||
665 | sb.Append("</string>"); | ||
666 | } | ||
667 | } | 658 | } |
668 | 659 | ||
669 | public static void AddElem(string name, Uri e, StringBuilder sb) | 660 | public static void AddElem(string name, Uri e, StringBuilder sb) |
@@ -723,6 +714,14 @@ namespace OpenSim.Framework | |||
723 | sb.Append(e); | 714 | sb.Append(e); |
724 | } | 715 | } |
725 | 716 | ||
717 | public static void AddLLSD(string name, string e, StringBuilder sb) | ||
718 | { | ||
719 | sb.Append("<key>"); | ||
720 | sb.Append(name); | ||
721 | sb.Append("</key>"); | ||
722 | sb.Append(e); | ||
723 | } | ||
724 | |||
726 | public static void EscapeToXML(string s, StringBuilder sb) | 725 | public static void EscapeToXML(string s, StringBuilder sb) |
727 | { | 726 | { |
728 | int i; | 727 | int i; |