aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Serialization
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Serialization')
-rw-r--r--OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs299
1 files changed, 150 insertions, 149 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
index 8f99dc6..3899b99 100644
--- a/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
+++ b/OpenSim/Region/Framework/Scenes/Serialization/SceneObjectSerializer.cs
@@ -59,8 +59,9 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
59 /// <returns>The scene object deserialized. Null on failure.</returns> 59 /// <returns>The scene object deserialized. Null on failure.</returns>
60 public static SceneObjectGroup FromOriginalXmlFormat(string xmlData) 60 public static SceneObjectGroup FromOriginalXmlFormat(string xmlData)
61 { 61 {
62 using (XmlTextReader reader = new XmlTextReader(xmlData, XmlNodeType.Element, null)) 62 using (XmlTextReader wrappedReader = new XmlTextReader(xmlData, XmlNodeType.Element, null))
63 return FromOriginalXmlFormat(reader); 63 using (XmlReader reader = XmlReader.Create(wrappedReader, new XmlReaderSettings() { IgnoreWhitespace = true, ConformanceLevel = ConformanceLevel.Fragment }))
64 return FromOriginalXmlFormat(reader);
64 } 65 }
65 66
66 /// <summary> 67 /// <summary>
@@ -68,7 +69,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
68 /// </summary> 69 /// </summary>
69 /// <param name="xmlData"></param> 70 /// <param name="xmlData"></param>
70 /// <returns>The scene object deserialized. Null on failure.</returns> 71 /// <returns>The scene object deserialized. Null on failure.</returns>
71 public static SceneObjectGroup FromOriginalXmlFormat(XmlTextReader reader) 72 public static SceneObjectGroup FromOriginalXmlFormat(XmlReader reader)
72 { 73 {
73 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG"); 74 //m_log.DebugFormat("[SOG]: Starting deserialization of SOG");
74 //int time = System.Environment.TickCount; 75 //int time = System.Environment.TickCount;
@@ -370,14 +371,14 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
370 371
371 #region manual serialization 372 #region manual serialization
372 373
373 private static Dictionary<string, Action<SceneObjectPart, XmlTextReader>> m_SOPXmlProcessors 374 private static Dictionary<string, Action<SceneObjectPart, XmlReader>> m_SOPXmlProcessors
374 = new Dictionary<string, Action<SceneObjectPart, XmlTextReader>>(); 375 = new Dictionary<string, Action<SceneObjectPart, XmlReader>>();
375 376
376 private static Dictionary<string, Action<TaskInventoryItem, XmlTextReader>> m_TaskInventoryXmlProcessors 377 private static Dictionary<string, Action<TaskInventoryItem, XmlReader>> m_TaskInventoryXmlProcessors
377 = new Dictionary<string, Action<TaskInventoryItem, XmlTextReader>>(); 378 = new Dictionary<string, Action<TaskInventoryItem, XmlReader>>();
378 379
379 private static Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>> m_ShapeXmlProcessors 380 private static Dictionary<string, Action<PrimitiveBaseShape, XmlReader>> m_ShapeXmlProcessors
380 = new Dictionary<string, Action<PrimitiveBaseShape, XmlTextReader>>(); 381 = new Dictionary<string, Action<PrimitiveBaseShape, XmlReader>>();
381 382
382 static SceneObjectSerializer() 383 static SceneObjectSerializer()
383 { 384 {
@@ -533,112 +534,112 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
533 } 534 }
534 535
535 #region SOPXmlProcessors 536 #region SOPXmlProcessors
536 private static void ProcessAllowedDrop(SceneObjectPart obj, XmlTextReader reader) 537 private static void ProcessAllowedDrop(SceneObjectPart obj, XmlReader reader)
537 { 538 {
538 obj.AllowedDrop = Util.ReadBoolean(reader); 539 obj.AllowedDrop = Util.ReadBoolean(reader);
539 } 540 }
540 541
541 private static void ProcessCreatorID(SceneObjectPart obj, XmlTextReader reader) 542 private static void ProcessCreatorID(SceneObjectPart obj, XmlReader reader)
542 { 543 {
543 obj.CreatorID = Util.ReadUUID(reader, "CreatorID"); 544 obj.CreatorID = Util.ReadUUID(reader, "CreatorID");
544 } 545 }
545 546
546 private static void ProcessCreatorData(SceneObjectPart obj, XmlTextReader reader) 547 private static void ProcessCreatorData(SceneObjectPart obj, XmlReader reader)
547 { 548 {
548 obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); 549 obj.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty);
549 } 550 }
550 551
551 private static void ProcessFolderID(SceneObjectPart obj, XmlTextReader reader) 552 private static void ProcessFolderID(SceneObjectPart obj, XmlReader reader)
552 { 553 {
553 obj.FolderID = Util.ReadUUID(reader, "FolderID"); 554 obj.FolderID = Util.ReadUUID(reader, "FolderID");
554 } 555 }
555 556
556 private static void ProcessInventorySerial(SceneObjectPart obj, XmlTextReader reader) 557 private static void ProcessInventorySerial(SceneObjectPart obj, XmlReader reader)
557 { 558 {
558 obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty); 559 obj.InventorySerial = (uint)reader.ReadElementContentAsInt("InventorySerial", String.Empty);
559 } 560 }
560 561
561 private static void ProcessTaskInventory(SceneObjectPart obj, XmlTextReader reader) 562 private static void ProcessTaskInventory(SceneObjectPart obj, XmlReader reader)
562 { 563 {
563 obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory"); 564 obj.TaskInventory = ReadTaskInventory(reader, "TaskInventory");
564 } 565 }
565 566
566 private static void ProcessUUID(SceneObjectPart obj, XmlTextReader reader) 567 private static void ProcessUUID(SceneObjectPart obj, XmlReader reader)
567 { 568 {
568 obj.UUID = Util.ReadUUID(reader, "UUID"); 569 obj.UUID = Util.ReadUUID(reader, "UUID");
569 } 570 }
570 571
571 private static void ProcessLocalId(SceneObjectPart obj, XmlTextReader reader) 572 private static void ProcessLocalId(SceneObjectPart obj, XmlReader reader)
572 { 573 {
573 obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty); 574 obj.LocalId = (uint)reader.ReadElementContentAsLong("LocalId", String.Empty);
574 } 575 }
575 576
576 private static void ProcessName(SceneObjectPart obj, XmlTextReader reader) 577 private static void ProcessName(SceneObjectPart obj, XmlReader reader)
577 { 578 {
578 obj.Name = reader.ReadElementString("Name"); 579 obj.Name = reader.ReadElementString("Name");
579 } 580 }
580 581
581 private static void ProcessMaterial(SceneObjectPart obj, XmlTextReader reader) 582 private static void ProcessMaterial(SceneObjectPart obj, XmlReader reader)
582 { 583 {
583 obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty); 584 obj.Material = (byte)reader.ReadElementContentAsInt("Material", String.Empty);
584 } 585 }
585 586
586 private static void ProcessPassTouches(SceneObjectPart obj, XmlTextReader reader) 587 private static void ProcessPassTouches(SceneObjectPart obj, XmlReader reader)
587 { 588 {
588 obj.PassTouches = Util.ReadBoolean(reader); 589 obj.PassTouches = Util.ReadBoolean(reader);
589 } 590 }
590 591
591 private static void ProcessPassCollisions(SceneObjectPart obj, XmlTextReader reader) 592 private static void ProcessPassCollisions(SceneObjectPart obj, XmlReader reader)
592 { 593 {
593 obj.PassCollisions = Util.ReadBoolean(reader); 594 obj.PassCollisions = Util.ReadBoolean(reader);
594 } 595 }
595 596
596 private static void ProcessRegionHandle(SceneObjectPart obj, XmlTextReader reader) 597 private static void ProcessRegionHandle(SceneObjectPart obj, XmlReader reader)
597 { 598 {
598 obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty); 599 obj.RegionHandle = (ulong)reader.ReadElementContentAsLong("RegionHandle", String.Empty);
599 } 600 }
600 601
601 private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlTextReader reader) 602 private static void ProcessScriptAccessPin(SceneObjectPart obj, XmlReader reader)
602 { 603 {
603 obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty); 604 obj.ScriptAccessPin = reader.ReadElementContentAsInt("ScriptAccessPin", String.Empty);
604 } 605 }
605 606
606 private static void ProcessGroupPosition(SceneObjectPart obj, XmlTextReader reader) 607 private static void ProcessGroupPosition(SceneObjectPart obj, XmlReader reader)
607 { 608 {
608 obj.GroupPosition = Util.ReadVector(reader, "GroupPosition"); 609 obj.GroupPosition = Util.ReadVector(reader, "GroupPosition");
609 } 610 }
610 611
611 private static void ProcessOffsetPosition(SceneObjectPart obj, XmlTextReader reader) 612 private static void ProcessOffsetPosition(SceneObjectPart obj, XmlReader reader)
612 { 613 {
613 obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ; 614 obj.OffsetPosition = Util.ReadVector(reader, "OffsetPosition"); ;
614 } 615 }
615 616
616 private static void ProcessRotationOffset(SceneObjectPart obj, XmlTextReader reader) 617 private static void ProcessRotationOffset(SceneObjectPart obj, XmlReader reader)
617 { 618 {
618 obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset"); 619 obj.RotationOffset = Util.ReadQuaternion(reader, "RotationOffset");
619 } 620 }
620 621
621 private static void ProcessVelocity(SceneObjectPart obj, XmlTextReader reader) 622 private static void ProcessVelocity(SceneObjectPart obj, XmlReader reader)
622 { 623 {
623 obj.Velocity = Util.ReadVector(reader, "Velocity"); 624 obj.Velocity = Util.ReadVector(reader, "Velocity");
624 } 625 }
625 626
626 private static void ProcessAngularVelocity(SceneObjectPart obj, XmlTextReader reader) 627 private static void ProcessAngularVelocity(SceneObjectPart obj, XmlReader reader)
627 { 628 {
628 obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity"); 629 obj.AngularVelocity = Util.ReadVector(reader, "AngularVelocity");
629 } 630 }
630 631
631 private static void ProcessAcceleration(SceneObjectPart obj, XmlTextReader reader) 632 private static void ProcessAcceleration(SceneObjectPart obj, XmlReader reader)
632 { 633 {
633 obj.Acceleration = Util.ReadVector(reader, "Acceleration"); 634 obj.Acceleration = Util.ReadVector(reader, "Acceleration");
634 } 635 }
635 636
636 private static void ProcessDescription(SceneObjectPart obj, XmlTextReader reader) 637 private static void ProcessDescription(SceneObjectPart obj, XmlReader reader)
637 { 638 {
638 obj.Description = reader.ReadElementString("Description"); 639 obj.Description = reader.ReadElementString("Description");
639 } 640 }
640 641
641 private static void ProcessColor(SceneObjectPart obj, XmlTextReader reader) 642 private static void ProcessColor(SceneObjectPart obj, XmlReader reader)
642 { 643 {
643 reader.ReadStartElement("Color"); 644 reader.ReadStartElement("Color");
644 if (reader.Name == "R") 645 if (reader.Name == "R")
@@ -652,57 +653,57 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
652 } 653 }
653 } 654 }
654 655
655 private static void ProcessText(SceneObjectPart obj, XmlTextReader reader) 656 private static void ProcessText(SceneObjectPart obj, XmlReader reader)
656 { 657 {
657 obj.Text = reader.ReadElementString("Text", String.Empty); 658 obj.Text = reader.ReadElementString("Text", String.Empty);
658 } 659 }
659 660
660 private static void ProcessSitName(SceneObjectPart obj, XmlTextReader reader) 661 private static void ProcessSitName(SceneObjectPart obj, XmlReader reader)
661 { 662 {
662 obj.SitName = reader.ReadElementString("SitName", String.Empty); 663 obj.SitName = reader.ReadElementString("SitName", String.Empty);
663 } 664 }
664 665
665 private static void ProcessTouchName(SceneObjectPart obj, XmlTextReader reader) 666 private static void ProcessTouchName(SceneObjectPart obj, XmlReader reader)
666 { 667 {
667 obj.TouchName = reader.ReadElementString("TouchName", String.Empty); 668 obj.TouchName = reader.ReadElementString("TouchName", String.Empty);
668 } 669 }
669 670
670 private static void ProcessLinkNum(SceneObjectPart obj, XmlTextReader reader) 671 private static void ProcessLinkNum(SceneObjectPart obj, XmlReader reader)
671 { 672 {
672 obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty); 673 obj.LinkNum = reader.ReadElementContentAsInt("LinkNum", String.Empty);
673 } 674 }
674 675
675 private static void ProcessClickAction(SceneObjectPart obj, XmlTextReader reader) 676 private static void ProcessClickAction(SceneObjectPart obj, XmlReader reader)
676 { 677 {
677 obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty); 678 obj.ClickAction = (byte)reader.ReadElementContentAsInt("ClickAction", String.Empty);
678 } 679 }
679 680
680 private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlTextReader reader) 681 private static void ProcessPhysicsShapeType(SceneObjectPart obj, XmlReader reader)
681 { 682 {
682 obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty); 683 obj.PhysicsShapeType = (byte)reader.ReadElementContentAsInt("PhysicsShapeType", String.Empty);
683 } 684 }
684 685
685 private static void ProcessDensity(SceneObjectPart obj, XmlTextReader reader) 686 private static void ProcessDensity(SceneObjectPart obj, XmlReader reader)
686 { 687 {
687 obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty); 688 obj.Density = reader.ReadElementContentAsFloat("Density", String.Empty);
688 } 689 }
689 690
690 private static void ProcessFriction(SceneObjectPart obj, XmlTextReader reader) 691 private static void ProcessFriction(SceneObjectPart obj, XmlReader reader)
691 { 692 {
692 obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty); 693 obj.Friction = reader.ReadElementContentAsFloat("Friction", String.Empty);
693 } 694 }
694 695
695 private static void ProcessBounce(SceneObjectPart obj, XmlTextReader reader) 696 private static void ProcessBounce(SceneObjectPart obj, XmlReader reader)
696 { 697 {
697 obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty); 698 obj.Restitution = reader.ReadElementContentAsFloat("Bounce", String.Empty);
698 } 699 }
699 700
700 private static void ProcessGravityModifier(SceneObjectPart obj, XmlTextReader reader) 701 private static void ProcessGravityModifier(SceneObjectPart obj, XmlReader reader)
701 { 702 {
702 obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty); 703 obj.GravityModifier = reader.ReadElementContentAsFloat("GravityModifier", String.Empty);
703 } 704 }
704 705
705 private static void ProcessShape(SceneObjectPart obj, XmlTextReader reader) 706 private static void ProcessShape(SceneObjectPart obj, XmlReader reader)
706 { 707 {
707 List<string> errorNodeNames; 708 List<string> errorNodeNames;
708 obj.Shape = ReadShape(reader, "Shape", out errorNodeNames); 709 obj.Shape = ReadShape(reader, "Shape", out errorNodeNames);
@@ -715,163 +716,163 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
715 } 716 }
716 } 717 }
717 718
718 private static void ProcessScale(SceneObjectPart obj, XmlTextReader reader) 719 private static void ProcessScale(SceneObjectPart obj, XmlReader reader)
719 { 720 {
720 obj.Scale = Util.ReadVector(reader, "Scale"); 721 obj.Scale = Util.ReadVector(reader, "Scale");
721 } 722 }
722 723
723 private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlTextReader reader) 724 private static void ProcessSitTargetOrientation(SceneObjectPart obj, XmlReader reader)
724 { 725 {
725 obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation"); 726 obj.SitTargetOrientation = Util.ReadQuaternion(reader, "SitTargetOrientation");
726 } 727 }
727 728
728 private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlTextReader reader) 729 private static void ProcessSitTargetPosition(SceneObjectPart obj, XmlReader reader)
729 { 730 {
730 obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition"); 731 obj.SitTargetPosition = Util.ReadVector(reader, "SitTargetPosition");
731 } 732 }
732 733
733 private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlTextReader reader) 734 private static void ProcessSitTargetPositionLL(SceneObjectPart obj, XmlReader reader)
734 { 735 {
735 obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL"); 736 obj.SitTargetPositionLL = Util.ReadVector(reader, "SitTargetPositionLL");
736 } 737 }
737 738
738 private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlTextReader reader) 739 private static void ProcessSitTargetOrientationLL(SceneObjectPart obj, XmlReader reader)
739 { 740 {
740 obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL"); 741 obj.SitTargetOrientationLL = Util.ReadQuaternion(reader, "SitTargetOrientationLL");
741 } 742 }
742 743
743 private static void ProcessParentID(SceneObjectPart obj, XmlTextReader reader) 744 private static void ProcessParentID(SceneObjectPart obj, XmlReader reader)
744 { 745 {
745 string str = reader.ReadElementContentAsString("ParentID", String.Empty); 746 string str = reader.ReadElementContentAsString("ParentID", String.Empty);
746 obj.ParentID = Convert.ToUInt32(str); 747 obj.ParentID = Convert.ToUInt32(str);
747 } 748 }
748 749
749 private static void ProcessCreationDate(SceneObjectPart obj, XmlTextReader reader) 750 private static void ProcessCreationDate(SceneObjectPart obj, XmlReader reader)
750 { 751 {
751 obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty); 752 obj.CreationDate = reader.ReadElementContentAsInt("CreationDate", String.Empty);
752 } 753 }
753 754
754 private static void ProcessCategory(SceneObjectPart obj, XmlTextReader reader) 755 private static void ProcessCategory(SceneObjectPart obj, XmlReader reader)
755 { 756 {
756 obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty); 757 obj.Category = (uint)reader.ReadElementContentAsInt("Category", String.Empty);
757 } 758 }
758 759
759 private static void ProcessSalePrice(SceneObjectPart obj, XmlTextReader reader) 760 private static void ProcessSalePrice(SceneObjectPart obj, XmlReader reader)
760 { 761 {
761 obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty); 762 obj.SalePrice = reader.ReadElementContentAsInt("SalePrice", String.Empty);
762 } 763 }
763 764
764 private static void ProcessObjectSaleType(SceneObjectPart obj, XmlTextReader reader) 765 private static void ProcessObjectSaleType(SceneObjectPart obj, XmlReader reader)
765 { 766 {
766 obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty); 767 obj.ObjectSaleType = (byte)reader.ReadElementContentAsInt("ObjectSaleType", String.Empty);
767 } 768 }
768 769
769 private static void ProcessOwnershipCost(SceneObjectPart obj, XmlTextReader reader) 770 private static void ProcessOwnershipCost(SceneObjectPart obj, XmlReader reader)
770 { 771 {
771 obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty); 772 obj.OwnershipCost = reader.ReadElementContentAsInt("OwnershipCost", String.Empty);
772 } 773 }
773 774
774 private static void ProcessGroupID(SceneObjectPart obj, XmlTextReader reader) 775 private static void ProcessGroupID(SceneObjectPart obj, XmlReader reader)
775 { 776 {
776 obj.GroupID = Util.ReadUUID(reader, "GroupID"); 777 obj.GroupID = Util.ReadUUID(reader, "GroupID");
777 } 778 }
778 779
779 private static void ProcessOwnerID(SceneObjectPart obj, XmlTextReader reader) 780 private static void ProcessOwnerID(SceneObjectPart obj, XmlReader reader)
780 { 781 {
781 obj.OwnerID = Util.ReadUUID(reader, "OwnerID"); 782 obj.OwnerID = Util.ReadUUID(reader, "OwnerID");
782 } 783 }
783 784
784 private static void ProcessLastOwnerID(SceneObjectPart obj, XmlTextReader reader) 785 private static void ProcessLastOwnerID(SceneObjectPart obj, XmlReader reader)
785 { 786 {
786 obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); 787 obj.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID");
787 } 788 }
788 789
789 private static void ProcessBaseMask(SceneObjectPart obj, XmlTextReader reader) 790 private static void ProcessBaseMask(SceneObjectPart obj, XmlReader reader)
790 { 791 {
791 obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty); 792 obj.BaseMask = (uint)reader.ReadElementContentAsInt("BaseMask", String.Empty);
792 } 793 }
793 794
794 private static void ProcessOwnerMask(SceneObjectPart obj, XmlTextReader reader) 795 private static void ProcessOwnerMask(SceneObjectPart obj, XmlReader reader)
795 { 796 {
796 obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty); 797 obj.OwnerMask = (uint)reader.ReadElementContentAsInt("OwnerMask", String.Empty);
797 } 798 }
798 799
799 private static void ProcessGroupMask(SceneObjectPart obj, XmlTextReader reader) 800 private static void ProcessGroupMask(SceneObjectPart obj, XmlReader reader)
800 { 801 {
801 obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty); 802 obj.GroupMask = (uint)reader.ReadElementContentAsInt("GroupMask", String.Empty);
802 } 803 }
803 804
804 private static void ProcessEveryoneMask(SceneObjectPart obj, XmlTextReader reader) 805 private static void ProcessEveryoneMask(SceneObjectPart obj, XmlReader reader)
805 { 806 {
806 obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty); 807 obj.EveryoneMask = (uint)reader.ReadElementContentAsInt("EveryoneMask", String.Empty);
807 } 808 }
808 809
809 private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlTextReader reader) 810 private static void ProcessNextOwnerMask(SceneObjectPart obj, XmlReader reader)
810 { 811 {
811 obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty); 812 obj.NextOwnerMask = (uint)reader.ReadElementContentAsInt("NextOwnerMask", String.Empty);
812 } 813 }
813 814
814 private static void ProcessFlags(SceneObjectPart obj, XmlTextReader reader) 815 private static void ProcessFlags(SceneObjectPart obj, XmlReader reader)
815 { 816 {
816 obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags"); 817 obj.Flags = Util.ReadEnum<PrimFlags>(reader, "Flags");
817 } 818 }
818 819
819 private static void ProcessCollisionSound(SceneObjectPart obj, XmlTextReader reader) 820 private static void ProcessCollisionSound(SceneObjectPart obj, XmlReader reader)
820 { 821 {
821 obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound"); 822 obj.CollisionSound = Util.ReadUUID(reader, "CollisionSound");
822 } 823 }
823 824
824 private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlTextReader reader) 825 private static void ProcessCollisionSoundVolume(SceneObjectPart obj, XmlReader reader)
825 { 826 {
826 obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty); 827 obj.CollisionSoundVolume = reader.ReadElementContentAsFloat("CollisionSoundVolume", String.Empty);
827 } 828 }
828 829
829 private static void ProcessMediaUrl(SceneObjectPart obj, XmlTextReader reader) 830 private static void ProcessMediaUrl(SceneObjectPart obj, XmlReader reader)
830 { 831 {
831 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty); 832 obj.MediaUrl = reader.ReadElementContentAsString("MediaUrl", String.Empty);
832 } 833 }
833 834
834 private static void ProcessAttachedPos(SceneObjectPart obj, XmlTextReader reader) 835 private static void ProcessAttachedPos(SceneObjectPart obj, XmlReader reader)
835 { 836 {
836 obj.AttachedPos = Util.ReadVector(reader, "AttachedPos"); 837 obj.AttachedPos = Util.ReadVector(reader, "AttachedPos");
837 } 838 }
838 839
839 private static void ProcessDynAttrs(SceneObjectPart obj, XmlTextReader reader) 840 private static void ProcessDynAttrs(SceneObjectPart obj, XmlReader reader)
840 { 841 {
841 obj.DynAttrs.ReadXml(reader); 842 obj.DynAttrs.ReadXml(reader);
842 } 843 }
843 844
844 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlTextReader reader) 845 private static void ProcessTextureAnimation(SceneObjectPart obj, XmlReader reader)
845 { 846 {
846 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty)); 847 obj.TextureAnimation = Convert.FromBase64String(reader.ReadElementContentAsString("TextureAnimation", String.Empty));
847 } 848 }
848 849
849 private static void ProcessParticleSystem(SceneObjectPart obj, XmlTextReader reader) 850 private static void ProcessParticleSystem(SceneObjectPart obj, XmlReader reader)
850 { 851 {
851 obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty)); 852 obj.ParticleSystem = Convert.FromBase64String(reader.ReadElementContentAsString("ParticleSystem", String.Empty));
852 } 853 }
853 854
854 private static void ProcessPayPrice0(SceneObjectPart obj, XmlTextReader reader) 855 private static void ProcessPayPrice0(SceneObjectPart obj, XmlReader reader)
855 { 856 {
856 obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty); 857 obj.PayPrice[0] = (int)reader.ReadElementContentAsInt("PayPrice0", String.Empty);
857 } 858 }
858 859
859 private static void ProcessPayPrice1(SceneObjectPart obj, XmlTextReader reader) 860 private static void ProcessPayPrice1(SceneObjectPart obj, XmlReader reader)
860 { 861 {
861 obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty); 862 obj.PayPrice[1] = (int)reader.ReadElementContentAsInt("PayPrice1", String.Empty);
862 } 863 }
863 864
864 private static void ProcessPayPrice2(SceneObjectPart obj, XmlTextReader reader) 865 private static void ProcessPayPrice2(SceneObjectPart obj, XmlReader reader)
865 { 866 {
866 obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty); 867 obj.PayPrice[2] = (int)reader.ReadElementContentAsInt("PayPrice2", String.Empty);
867 } 868 }
868 869
869 private static void ProcessPayPrice3(SceneObjectPart obj, XmlTextReader reader) 870 private static void ProcessPayPrice3(SceneObjectPart obj, XmlReader reader)
870 { 871 {
871 obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty); 872 obj.PayPrice[3] = (int)reader.ReadElementContentAsInt("PayPrice3", String.Empty);
872 } 873 }
873 874
874 private static void ProcessPayPrice4(SceneObjectPart obj, XmlTextReader reader) 875 private static void ProcessPayPrice4(SceneObjectPart obj, XmlReader reader)
875 { 876 {
876 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty); 877 obj.PayPrice[4] = (int)reader.ReadElementContentAsInt("PayPrice4", String.Empty);
877 } 878 }
@@ -879,122 +880,122 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
879 #endregion 880 #endregion
880 881
881 #region TaskInventoryXmlProcessors 882 #region TaskInventoryXmlProcessors
882 private static void ProcessTIAssetID(TaskInventoryItem item, XmlTextReader reader) 883 private static void ProcessTIAssetID(TaskInventoryItem item, XmlReader reader)
883 { 884 {
884 item.AssetID = Util.ReadUUID(reader, "AssetID"); 885 item.AssetID = Util.ReadUUID(reader, "AssetID");
885 } 886 }
886 887
887 private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlTextReader reader) 888 private static void ProcessTIBasePermissions(TaskInventoryItem item, XmlReader reader)
888 { 889 {
889 item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty); 890 item.BasePermissions = (uint)reader.ReadElementContentAsInt("BasePermissions", String.Empty);
890 } 891 }
891 892
892 private static void ProcessTICreationDate(TaskInventoryItem item, XmlTextReader reader) 893 private static void ProcessTICreationDate(TaskInventoryItem item, XmlReader reader)
893 { 894 {
894 item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty); 895 item.CreationDate = (uint)reader.ReadElementContentAsInt("CreationDate", String.Empty);
895 } 896 }
896 897
897 private static void ProcessTICreatorID(TaskInventoryItem item, XmlTextReader reader) 898 private static void ProcessTICreatorID(TaskInventoryItem item, XmlReader reader)
898 { 899 {
899 item.CreatorID = Util.ReadUUID(reader, "CreatorID"); 900 item.CreatorID = Util.ReadUUID(reader, "CreatorID");
900 } 901 }
901 902
902 private static void ProcessTICreatorData(TaskInventoryItem item, XmlTextReader reader) 903 private static void ProcessTICreatorData(TaskInventoryItem item, XmlReader reader)
903 { 904 {
904 item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty); 905 item.CreatorData = reader.ReadElementContentAsString("CreatorData", String.Empty);
905 } 906 }
906 907
907 private static void ProcessTIDescription(TaskInventoryItem item, XmlTextReader reader) 908 private static void ProcessTIDescription(TaskInventoryItem item, XmlReader reader)
908 { 909 {
909 item.Description = reader.ReadElementContentAsString("Description", String.Empty); 910 item.Description = reader.ReadElementContentAsString("Description", String.Empty);
910 } 911 }
911 912
912 private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlTextReader reader) 913 private static void ProcessTIEveryonePermissions(TaskInventoryItem item, XmlReader reader)
913 { 914 {
914 item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty); 915 item.EveryonePermissions = (uint)reader.ReadElementContentAsInt("EveryonePermissions", String.Empty);
915 } 916 }
916 917
917 private static void ProcessTIFlags(TaskInventoryItem item, XmlTextReader reader) 918 private static void ProcessTIFlags(TaskInventoryItem item, XmlReader reader)
918 { 919 {
919 item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty); 920 item.Flags = (uint)reader.ReadElementContentAsInt("Flags", String.Empty);
920 } 921 }
921 922
922 private static void ProcessTIGroupID(TaskInventoryItem item, XmlTextReader reader) 923 private static void ProcessTIGroupID(TaskInventoryItem item, XmlReader reader)
923 { 924 {
924 item.GroupID = Util.ReadUUID(reader, "GroupID"); 925 item.GroupID = Util.ReadUUID(reader, "GroupID");
925 } 926 }
926 927
927 private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlTextReader reader) 928 private static void ProcessTIGroupPermissions(TaskInventoryItem item, XmlReader reader)
928 { 929 {
929 item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty); 930 item.GroupPermissions = (uint)reader.ReadElementContentAsInt("GroupPermissions", String.Empty);
930 } 931 }
931 932
932 private static void ProcessTIInvType(TaskInventoryItem item, XmlTextReader reader) 933 private static void ProcessTIInvType(TaskInventoryItem item, XmlReader reader)
933 { 934 {
934 item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty); 935 item.InvType = reader.ReadElementContentAsInt("InvType", String.Empty);
935 } 936 }
936 937
937 private static void ProcessTIItemID(TaskInventoryItem item, XmlTextReader reader) 938 private static void ProcessTIItemID(TaskInventoryItem item, XmlReader reader)
938 { 939 {
939 item.ItemID = Util.ReadUUID(reader, "ItemID"); 940 item.ItemID = Util.ReadUUID(reader, "ItemID");
940 } 941 }
941 942
942 private static void ProcessTIOldItemID(TaskInventoryItem item, XmlTextReader reader) 943 private static void ProcessTIOldItemID(TaskInventoryItem item, XmlReader reader)
943 { 944 {
944 item.OldItemID = Util.ReadUUID(reader, "OldItemID"); 945 item.OldItemID = Util.ReadUUID(reader, "OldItemID");
945 } 946 }
946 947
947 private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlTextReader reader) 948 private static void ProcessTILastOwnerID(TaskInventoryItem item, XmlReader reader)
948 { 949 {
949 item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID"); 950 item.LastOwnerID = Util.ReadUUID(reader, "LastOwnerID");
950 } 951 }
951 952
952 private static void ProcessTIName(TaskInventoryItem item, XmlTextReader reader) 953 private static void ProcessTIName(TaskInventoryItem item, XmlReader reader)
953 { 954 {
954 item.Name = reader.ReadElementContentAsString("Name", String.Empty); 955 item.Name = reader.ReadElementContentAsString("Name", String.Empty);
955 } 956 }
956 957
957 private static void ProcessTINextPermissions(TaskInventoryItem item, XmlTextReader reader) 958 private static void ProcessTINextPermissions(TaskInventoryItem item, XmlReader reader)
958 { 959 {
959 item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty); 960 item.NextPermissions = (uint)reader.ReadElementContentAsInt("NextPermissions", String.Empty);
960 } 961 }
961 962
962 private static void ProcessTIOwnerID(TaskInventoryItem item, XmlTextReader reader) 963 private static void ProcessTIOwnerID(TaskInventoryItem item, XmlReader reader)
963 { 964 {
964 item.OwnerID = Util.ReadUUID(reader, "OwnerID"); 965 item.OwnerID = Util.ReadUUID(reader, "OwnerID");
965 } 966 }
966 967
967 private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlTextReader reader) 968 private static void ProcessTICurrentPermissions(TaskInventoryItem item, XmlReader reader)
968 { 969 {
969 item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty); 970 item.CurrentPermissions = (uint)reader.ReadElementContentAsInt("CurrentPermissions", String.Empty);
970 } 971 }
971 972
972 private static void ProcessTIParentID(TaskInventoryItem item, XmlTextReader reader) 973 private static void ProcessTIParentID(TaskInventoryItem item, XmlReader reader)
973 { 974 {
974 item.ParentID = Util.ReadUUID(reader, "ParentID"); 975 item.ParentID = Util.ReadUUID(reader, "ParentID");
975 } 976 }
976 977
977 private static void ProcessTIParentPartID(TaskInventoryItem item, XmlTextReader reader) 978 private static void ProcessTIParentPartID(TaskInventoryItem item, XmlReader reader)
978 { 979 {
979 item.ParentPartID = Util.ReadUUID(reader, "ParentPartID"); 980 item.ParentPartID = Util.ReadUUID(reader, "ParentPartID");
980 } 981 }
981 982
982 private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlTextReader reader) 983 private static void ProcessTIPermsGranter(TaskInventoryItem item, XmlReader reader)
983 { 984 {
984 item.PermsGranter = Util.ReadUUID(reader, "PermsGranter"); 985 item.PermsGranter = Util.ReadUUID(reader, "PermsGranter");
985 } 986 }
986 987
987 private static void ProcessTIPermsMask(TaskInventoryItem item, XmlTextReader reader) 988 private static void ProcessTIPermsMask(TaskInventoryItem item, XmlReader reader)
988 { 989 {
989 item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty); 990 item.PermsMask = reader.ReadElementContentAsInt("PermsMask", String.Empty);
990 } 991 }
991 992
992 private static void ProcessTIType(TaskInventoryItem item, XmlTextReader reader) 993 private static void ProcessTIType(TaskInventoryItem item, XmlReader reader)
993 { 994 {
994 item.Type = reader.ReadElementContentAsInt("Type", String.Empty); 995 item.Type = reader.ReadElementContentAsInt("Type", String.Empty);
995 } 996 }
996 997
997 private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlTextReader reader) 998 private static void ProcessTIOwnerChanged(TaskInventoryItem item, XmlReader reader)
998 { 999 {
999 item.OwnerChanged = Util.ReadBoolean(reader); 1000 item.OwnerChanged = Util.ReadBoolean(reader);
1000 } 1001 }
@@ -1002,243 +1003,243 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1002 #endregion 1003 #endregion
1003 1004
1004 #region ShapeXmlProcessors 1005 #region ShapeXmlProcessors
1005 private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlTextReader reader) 1006 private static void ProcessShpProfileCurve(PrimitiveBaseShape shp, XmlReader reader)
1006 { 1007 {
1007 shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty); 1008 shp.ProfileCurve = (byte)reader.ReadElementContentAsInt("ProfileCurve", String.Empty);
1008 } 1009 }
1009 1010
1010 private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlTextReader reader) 1011 private static void ProcessShpTextureEntry(PrimitiveBaseShape shp, XmlReader reader)
1011 { 1012 {
1012 byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry")); 1013 byte[] teData = Convert.FromBase64String(reader.ReadElementString("TextureEntry"));
1013 shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length); 1014 shp.Textures = new Primitive.TextureEntry(teData, 0, teData.Length);
1014 } 1015 }
1015 1016
1016 private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlTextReader reader) 1017 private static void ProcessShpExtraParams(PrimitiveBaseShape shp, XmlReader reader)
1017 { 1018 {
1018 shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams")); 1019 shp.ExtraParams = Convert.FromBase64String(reader.ReadElementString("ExtraParams"));
1019 } 1020 }
1020 1021
1021 private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlTextReader reader) 1022 private static void ProcessShpPathBegin(PrimitiveBaseShape shp, XmlReader reader)
1022 { 1023 {
1023 shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty); 1024 shp.PathBegin = (ushort)reader.ReadElementContentAsInt("PathBegin", String.Empty);
1024 } 1025 }
1025 1026
1026 private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlTextReader reader) 1027 private static void ProcessShpPathCurve(PrimitiveBaseShape shp, XmlReader reader)
1027 { 1028 {
1028 shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty); 1029 shp.PathCurve = (byte)reader.ReadElementContentAsInt("PathCurve", String.Empty);
1029 } 1030 }
1030 1031
1031 private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlTextReader reader) 1032 private static void ProcessShpPathEnd(PrimitiveBaseShape shp, XmlReader reader)
1032 { 1033 {
1033 shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty); 1034 shp.PathEnd = (ushort)reader.ReadElementContentAsInt("PathEnd", String.Empty);
1034 } 1035 }
1035 1036
1036 private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlTextReader reader) 1037 private static void ProcessShpPathRadiusOffset(PrimitiveBaseShape shp, XmlReader reader)
1037 { 1038 {
1038 shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty); 1039 shp.PathRadiusOffset = (sbyte)reader.ReadElementContentAsInt("PathRadiusOffset", String.Empty);
1039 } 1040 }
1040 1041
1041 private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlTextReader reader) 1042 private static void ProcessShpPathRevolutions(PrimitiveBaseShape shp, XmlReader reader)
1042 { 1043 {
1043 shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty); 1044 shp.PathRevolutions = (byte)reader.ReadElementContentAsInt("PathRevolutions", String.Empty);
1044 } 1045 }
1045 1046
1046 private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlTextReader reader) 1047 private static void ProcessShpPathScaleX(PrimitiveBaseShape shp, XmlReader reader)
1047 { 1048 {
1048 shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty); 1049 shp.PathScaleX = (byte)reader.ReadElementContentAsInt("PathScaleX", String.Empty);
1049 } 1050 }
1050 1051
1051 private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlTextReader reader) 1052 private static void ProcessShpPathScaleY(PrimitiveBaseShape shp, XmlReader reader)
1052 { 1053 {
1053 shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty); 1054 shp.PathScaleY = (byte)reader.ReadElementContentAsInt("PathScaleY", String.Empty);
1054 } 1055 }
1055 1056
1056 private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlTextReader reader) 1057 private static void ProcessShpPathShearX(PrimitiveBaseShape shp, XmlReader reader)
1057 { 1058 {
1058 shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty); 1059 shp.PathShearX = (byte)reader.ReadElementContentAsInt("PathShearX", String.Empty);
1059 } 1060 }
1060 1061
1061 private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlTextReader reader) 1062 private static void ProcessShpPathShearY(PrimitiveBaseShape shp, XmlReader reader)
1062 { 1063 {
1063 shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty); 1064 shp.PathShearY = (byte)reader.ReadElementContentAsInt("PathShearY", String.Empty);
1064 } 1065 }
1065 1066
1066 private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlTextReader reader) 1067 private static void ProcessShpPathSkew(PrimitiveBaseShape shp, XmlReader reader)
1067 { 1068 {
1068 shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty); 1069 shp.PathSkew = (sbyte)reader.ReadElementContentAsInt("PathSkew", String.Empty);
1069 } 1070 }
1070 1071
1071 private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlTextReader reader) 1072 private static void ProcessShpPathTaperX(PrimitiveBaseShape shp, XmlReader reader)
1072 { 1073 {
1073 shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty); 1074 shp.PathTaperX = (sbyte)reader.ReadElementContentAsInt("PathTaperX", String.Empty);
1074 } 1075 }
1075 1076
1076 private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlTextReader reader) 1077 private static void ProcessShpPathTaperY(PrimitiveBaseShape shp, XmlReader reader)
1077 { 1078 {
1078 shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty); 1079 shp.PathTaperY = (sbyte)reader.ReadElementContentAsInt("PathTaperY", String.Empty);
1079 } 1080 }
1080 1081
1081 private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlTextReader reader) 1082 private static void ProcessShpPathTwist(PrimitiveBaseShape shp, XmlReader reader)
1082 { 1083 {
1083 shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty); 1084 shp.PathTwist = (sbyte)reader.ReadElementContentAsInt("PathTwist", String.Empty);
1084 } 1085 }
1085 1086
1086 private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlTextReader reader) 1087 private static void ProcessShpPathTwistBegin(PrimitiveBaseShape shp, XmlReader reader)
1087 { 1088 {
1088 shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty); 1089 shp.PathTwistBegin = (sbyte)reader.ReadElementContentAsInt("PathTwistBegin", String.Empty);
1089 } 1090 }
1090 1091
1091 private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlTextReader reader) 1092 private static void ProcessShpPCode(PrimitiveBaseShape shp, XmlReader reader)
1092 { 1093 {
1093 shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty); 1094 shp.PCode = (byte)reader.ReadElementContentAsInt("PCode", String.Empty);
1094 } 1095 }
1095 1096
1096 private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlTextReader reader) 1097 private static void ProcessShpProfileBegin(PrimitiveBaseShape shp, XmlReader reader)
1097 { 1098 {
1098 shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty); 1099 shp.ProfileBegin = (ushort)reader.ReadElementContentAsInt("ProfileBegin", String.Empty);
1099 } 1100 }
1100 1101
1101 private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlTextReader reader) 1102 private static void ProcessShpProfileEnd(PrimitiveBaseShape shp, XmlReader reader)
1102 { 1103 {
1103 shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty); 1104 shp.ProfileEnd = (ushort)reader.ReadElementContentAsInt("ProfileEnd", String.Empty);
1104 } 1105 }
1105 1106
1106 private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlTextReader reader) 1107 private static void ProcessShpProfileHollow(PrimitiveBaseShape shp, XmlReader reader)
1107 { 1108 {
1108 shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty); 1109 shp.ProfileHollow = (ushort)reader.ReadElementContentAsInt("ProfileHollow", String.Empty);
1109 } 1110 }
1110 1111
1111 private static void ProcessShpScale(PrimitiveBaseShape shp, XmlTextReader reader) 1112 private static void ProcessShpScale(PrimitiveBaseShape shp, XmlReader reader)
1112 { 1113 {
1113 shp.Scale = Util.ReadVector(reader, "Scale"); 1114 shp.Scale = Util.ReadVector(reader, "Scale");
1114 } 1115 }
1115 1116
1116 private static void ProcessShpState(PrimitiveBaseShape shp, XmlTextReader reader) 1117 private static void ProcessShpState(PrimitiveBaseShape shp, XmlReader reader)
1117 { 1118 {
1118 shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty); 1119 shp.State = (byte)reader.ReadElementContentAsInt("State", String.Empty);
1119 } 1120 }
1120 1121
1121 private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlTextReader reader) 1122 private static void ProcessShpLastAttach(PrimitiveBaseShape shp, XmlReader reader)
1122 { 1123 {
1123 shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty); 1124 shp.LastAttachPoint = (byte)reader.ReadElementContentAsInt("LastAttachPoint", String.Empty);
1124 } 1125 }
1125 1126
1126 private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlTextReader reader) 1127 private static void ProcessShpProfileShape(PrimitiveBaseShape shp, XmlReader reader)
1127 { 1128 {
1128 shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape"); 1129 shp.ProfileShape = Util.ReadEnum<ProfileShape>(reader, "ProfileShape");
1129 } 1130 }
1130 1131
1131 private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlTextReader reader) 1132 private static void ProcessShpHollowShape(PrimitiveBaseShape shp, XmlReader reader)
1132 { 1133 {
1133 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape"); 1134 shp.HollowShape = Util.ReadEnum<HollowShape>(reader, "HollowShape");
1134 } 1135 }
1135 1136
1136 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlTextReader reader) 1137 private static void ProcessShpSculptTexture(PrimitiveBaseShape shp, XmlReader reader)
1137 { 1138 {
1138 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture"); 1139 shp.SculptTexture = Util.ReadUUID(reader, "SculptTexture");
1139 } 1140 }
1140 1141
1141 private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlTextReader reader) 1142 private static void ProcessShpSculptType(PrimitiveBaseShape shp, XmlReader reader)
1142 { 1143 {
1143 shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty); 1144 shp.SculptType = (byte)reader.ReadElementContentAsInt("SculptType", String.Empty);
1144 } 1145 }
1145 1146
1146 private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlTextReader reader) 1147 private static void ProcessShpFlexiSoftness(PrimitiveBaseShape shp, XmlReader reader)
1147 { 1148 {
1148 shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty); 1149 shp.FlexiSoftness = reader.ReadElementContentAsInt("FlexiSoftness", String.Empty);
1149 } 1150 }
1150 1151
1151 private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlTextReader reader) 1152 private static void ProcessShpFlexiTension(PrimitiveBaseShape shp, XmlReader reader)
1152 { 1153 {
1153 shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty); 1154 shp.FlexiTension = reader.ReadElementContentAsFloat("FlexiTension", String.Empty);
1154 } 1155 }
1155 1156
1156 private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlTextReader reader) 1157 private static void ProcessShpFlexiDrag(PrimitiveBaseShape shp, XmlReader reader)
1157 { 1158 {
1158 shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty); 1159 shp.FlexiDrag = reader.ReadElementContentAsFloat("FlexiDrag", String.Empty);
1159 } 1160 }
1160 1161
1161 private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlTextReader reader) 1162 private static void ProcessShpFlexiGravity(PrimitiveBaseShape shp, XmlReader reader)
1162 { 1163 {
1163 shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty); 1164 shp.FlexiGravity = reader.ReadElementContentAsFloat("FlexiGravity", String.Empty);
1164 } 1165 }
1165 1166
1166 private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlTextReader reader) 1167 private static void ProcessShpFlexiWind(PrimitiveBaseShape shp, XmlReader reader)
1167 { 1168 {
1168 shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty); 1169 shp.FlexiWind = reader.ReadElementContentAsFloat("FlexiWind", String.Empty);
1169 } 1170 }
1170 1171
1171 private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlTextReader reader) 1172 private static void ProcessShpFlexiForceX(PrimitiveBaseShape shp, XmlReader reader)
1172 { 1173 {
1173 shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty); 1174 shp.FlexiForceX = reader.ReadElementContentAsFloat("FlexiForceX", String.Empty);
1174 } 1175 }
1175 1176
1176 private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlTextReader reader) 1177 private static void ProcessShpFlexiForceY(PrimitiveBaseShape shp, XmlReader reader)
1177 { 1178 {
1178 shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty); 1179 shp.FlexiForceY = reader.ReadElementContentAsFloat("FlexiForceY", String.Empty);
1179 } 1180 }
1180 1181
1181 private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlTextReader reader) 1182 private static void ProcessShpFlexiForceZ(PrimitiveBaseShape shp, XmlReader reader)
1182 { 1183 {
1183 shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty); 1184 shp.FlexiForceZ = reader.ReadElementContentAsFloat("FlexiForceZ", String.Empty);
1184 } 1185 }
1185 1186
1186 private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlTextReader reader) 1187 private static void ProcessShpLightColorR(PrimitiveBaseShape shp, XmlReader reader)
1187 { 1188 {
1188 shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty); 1189 shp.LightColorR = reader.ReadElementContentAsFloat("LightColorR", String.Empty);
1189 } 1190 }
1190 1191
1191 private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlTextReader reader) 1192 private static void ProcessShpLightColorG(PrimitiveBaseShape shp, XmlReader reader)
1192 { 1193 {
1193 shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty); 1194 shp.LightColorG = reader.ReadElementContentAsFloat("LightColorG", String.Empty);
1194 } 1195 }
1195 1196
1196 private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlTextReader reader) 1197 private static void ProcessShpLightColorB(PrimitiveBaseShape shp, XmlReader reader)
1197 { 1198 {
1198 shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty); 1199 shp.LightColorB = reader.ReadElementContentAsFloat("LightColorB", String.Empty);
1199 } 1200 }
1200 1201
1201 private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlTextReader reader) 1202 private static void ProcessShpLightColorA(PrimitiveBaseShape shp, XmlReader reader)
1202 { 1203 {
1203 shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty); 1204 shp.LightColorA = reader.ReadElementContentAsFloat("LightColorA", String.Empty);
1204 } 1205 }
1205 1206
1206 private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlTextReader reader) 1207 private static void ProcessShpLightRadius(PrimitiveBaseShape shp, XmlReader reader)
1207 { 1208 {
1208 shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty); 1209 shp.LightRadius = reader.ReadElementContentAsFloat("LightRadius", String.Empty);
1209 } 1210 }
1210 1211
1211 private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlTextReader reader) 1212 private static void ProcessShpLightCutoff(PrimitiveBaseShape shp, XmlReader reader)
1212 { 1213 {
1213 shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty); 1214 shp.LightCutoff = reader.ReadElementContentAsFloat("LightCutoff", String.Empty);
1214 } 1215 }
1215 1216
1216 private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlTextReader reader) 1217 private static void ProcessShpLightFalloff(PrimitiveBaseShape shp, XmlReader reader)
1217 { 1218 {
1218 shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty); 1219 shp.LightFalloff = reader.ReadElementContentAsFloat("LightFalloff", String.Empty);
1219 } 1220 }
1220 1221
1221 private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlTextReader reader) 1222 private static void ProcessShpLightIntensity(PrimitiveBaseShape shp, XmlReader reader)
1222 { 1223 {
1223 shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty); 1224 shp.LightIntensity = reader.ReadElementContentAsFloat("LightIntensity", String.Empty);
1224 } 1225 }
1225 1226
1226 private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlTextReader reader) 1227 private static void ProcessShpFlexiEntry(PrimitiveBaseShape shp, XmlReader reader)
1227 { 1228 {
1228 shp.FlexiEntry = Util.ReadBoolean(reader); 1229 shp.FlexiEntry = Util.ReadBoolean(reader);
1229 } 1230 }
1230 1231
1231 private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlTextReader reader) 1232 private static void ProcessShpLightEntry(PrimitiveBaseShape shp, XmlReader reader)
1232 { 1233 {
1233 shp.LightEntry = Util.ReadBoolean(reader); 1234 shp.LightEntry = Util.ReadBoolean(reader);
1234 } 1235 }
1235 1236
1236 private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlTextReader reader) 1237 private static void ProcessShpSculptEntry(PrimitiveBaseShape shp, XmlReader reader)
1237 { 1238 {
1238 shp.SculptEntry = Util.ReadBoolean(reader); 1239 shp.SculptEntry = Util.ReadBoolean(reader);
1239 } 1240 }
1240 1241
1241 private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlTextReader reader) 1242 private static void ProcessShpMedia(PrimitiveBaseShape shp, XmlReader reader)
1242 { 1243 {
1243 string value = reader.ReadElementContentAsString("Media", String.Empty); 1244 string value = reader.ReadElementContentAsString("Media", String.Empty);
1244 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value); 1245 shp.Media = PrimitiveBaseShape.MediaList.FromXml(value);
@@ -1590,7 +1591,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1590 } 1591 }
1591 } 1592 }
1592 1593
1593 public static SceneObjectPart Xml2ToSOP(XmlTextReader reader) 1594 public static SceneObjectPart Xml2ToSOP(XmlReader reader)
1594 { 1595 {
1595 SceneObjectPart obj = new SceneObjectPart(); 1596 SceneObjectPart obj = new SceneObjectPart();
1596 1597
@@ -1611,7 +1612,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1611 return obj; 1612 return obj;
1612 } 1613 }
1613 1614
1614 public static TaskInventoryDictionary ReadTaskInventory(XmlTextReader reader, string name) 1615 public static TaskInventoryDictionary ReadTaskInventory(XmlReader reader, string name)
1615 { 1616 {
1616 TaskInventoryDictionary tinv = new TaskInventoryDictionary(); 1617 TaskInventoryDictionary tinv = new TaskInventoryDictionary();
1617 1618
@@ -1652,7 +1653,7 @@ namespace OpenSim.Region.Framework.Scenes.Serialization
1652 /// <param name="name">The name of the xml element containing the shape</param> 1653 /// <param name="name">The name of the xml element containing the shape</param>
1653 /// <param name="errors">a list containing the failing node names. If no failures then null.</param> 1654 /// <param name="errors">a list containing the failing node names. If no failures then null.</param>
1654 /// <returns>The shape parsed</returns> 1655 /// <returns>The shape parsed</returns>
1655 public static PrimitiveBaseShape ReadShape(XmlTextReader reader, string name, out List<string> errorNodeNames) 1656 public static PrimitiveBaseShape ReadShape(XmlReader reader, string name, out List<string> errorNodeNames)
1656 { 1657 {
1657 List<string> internalErrorNodeNames = null; 1658 List<string> internalErrorNodeNames = null;
1658 1659