D
D
Divor21232021-04-20 17:14:26
1C
Divor2123, 2021-04-20 17:14:26

Request XML in 1s (Error with Ampersand)?

Good afternoon, please tell me how to solve the problem
in 1C, there is a code that forms a meeting in Outlook from the event and everything worked fine until "&") appeared)
now very often the link to the meeting in the Cisco meeting is indicated in the event and their link contains a sign, because of this, the data does not go to outlook, how to fix this situation in xml programming is not strong (

<Body BodyType=""Text"">"+XMLСтрока(ОписаниеOutlook)+"</Body>"+ ?(ЗначениеЗаполнено(Файлы),Файлы,"") + "

error on given line, "DescriptionOutlook" passes description from 1s line to outlook
below whole request

ТекстЗапроса = "<?xml version=""1.0"" encoding=""utf-8""?>
  |<soap:Envelope xmlns:xsi=""http://www.w3.org/2001/XMLSchema-instance""
  |            xmlns:xsd=""http://www.w3.org/2001/XMLSchema""
  |           xmlns:soap=""http://schemas.xmlsoap.org/soap/envelope/""
  |             xmlns:t=""http://schemas.microsoft.com/exchange/services/2006/types"">
  |<soap:Header>
  |   <t:RequestServerVersion Version=""Exchange2013""/>
  |      <t:TimeZoneContext>
  |        <t:TimeZoneDefinition Id=""Russian Standard Time"" />
  |      </t:TimeZoneContext>
  |</soap:Header>
  |	<soap:Body>
  |		<CreateItem xmlns=""http://schemas.microsoft.com/exchange/services/2006/messages""
  |             xmlns:t=""http://schemas.microsoft.com/exchange/services/2006/types"" 
  |            SendMeetingInvitations=""SendToAllAndSaveCopy"" >
  |			<SavedItemFolderId>
  |				<t:DistinguishedFolderId Id=""calendar"">
  |					<t:Mailbox>
  |						<t:EmailAddress>"+СокрЛП(АдресПочтыВКоторомБудутСоздаватьсяЗаписи)+"</t:EmailAddress>
  |					</t:Mailbox>
  |				</t:DistinguishedFolderId>
  |			</SavedItemFolderId>
  |			<Items>
  |				<t:CalendarItem xmlns=""http://schemas.microsoft.com/exchange/services/2006/types"">
  |					<Subject>"+XMLСтрока(НаименованиеOutlook)+"</Subject>
  |					<Body BodyType=""Text"">"+XMLСтрока(ОписаниеOutlook)+"</Body>"+ ?(ЗначениеЗаполнено(Файлы),Файлы,"") + "
  |					<ReminderIsSet>true</ReminderIsSet>
  |					<ReminderMinutesBeforeStart>60</ReminderMinutesBeforeStart>
  |					<Start>"+XMLСтрока(ДатаНачалаOutlook)+"</Start>
  |					<End>"+XMLСтрока(ДатаОкончанияOutlook)+"</End>
  |					<IsAllDayEvent>"+XMLСтрока(ВесьДеньOutlook)+"</IsAllDayEvent>
  |					<LegacyFreeBusyStatus>"+XMLСтрока(ВидЗанятостиOutlook)+"</LegacyFreeBusyStatus>
  |                   <Location>"+XMLСтрока(МестоВстречи)+"</Location>
  |					<RequiredAttendees>
  |";

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Anton Anton, 2021-04-20
@Fragster

In two or three words - everything is wrong here. As a hack - replace &with &amp;(for good - and the rest https://www.w3schools.com/html/html_entities.asp )
For good - read about XDTO and XSD schemes in 1s, Web services and that's all, for example https: //infostart.ru/public/98019/ and also through links and searching the Internet for these keywords

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question