background top icon
background center wave icon
background filled rhombus icon
background two lines icon
background stroke rhombus icon

Download "Как прочитать XML в 1С. Способ № 2 (XDTO)"

input logo icon
Video tags
|

Video tags

1с предприятие
программирование 1с
программист 1с
ironskills
курсы 1с
обучение 1с
уроки 1с
1с 8.3
1с программирование
1с уроки
1с уроки программирования
программирование в 1с
1с для начинающих
1с знакомство
1с с нуля
курсы программирования 1с
программирование 1с 8.3
код 1с
код 1с 8.3
txt 1с предприятие
1с загрузка из excel
1с загрузка номенклатуры из excel
1с текст
1с работа с файлами
чтение xml 1с
1с xml
загрузка xml в 1с
Subtitles
|

Subtitles

subtitles menu arrow
  • ruRussian
Download
00:00:01
in this video we will look at another way to
00:00:03
read an xml document using the
00:00:05
x children of their children mechanism or xml data
00:00:10
transfer object, this is a platform mechanism
00:00:12
that allows you to work at the
00:00:15
built-in language level not with
00:00:16
xml document nodes,
00:00:17
but to work with objects, that is, we can
00:00:21
read an xml document and get not a set of nodes, but
00:00:24
get a set of objects and you can get
00:00:27
the data of each object by accessing all the
00:00:29
properties in the same way as we would
00:00:30
access the properties of any object of the
00:00:32
built-in language through a dot on the slide; an
00:00:35
example is given of the
00:00:36
counterparty node, which contains three more
00:00:39
nested nodes on MNP and full name
00:00:41
when reading using the mechanism of their
00:00:44
children, we will receive an object whose properties
00:00:47
can be accessed through a
00:00:48
dot, that is, there will be a counterparty object and
00:00:50
through . it will be possible to access the name
00:00:53
by specifying the name of the element as well as in
00:00:56
xml name n.p.
00:00:58
the body is also here at the settlement. also as
00:01:00
indicated in xml and complete, in order to
00:01:03
read an xml document using a
00:01:05
technology somewhere, an
00:01:07
object of the built-in language
00:01:08
factory x is used, to
00:01:11
access it, just turn to the
00:01:12
property of the global
00:01:14
context with the same name, let’s go to the configurator and
00:01:18
read the xml file in the procedure, first
00:01:20
we’ll do Next,
00:01:22
let's declare a variable reading method, it
00:01:26
will be a variable of type string in which it
00:01:28
will simply be explicitly indicated
00:01:30
how we read the file, I will set the
00:01:32
value to look like it
00:01:33
and in the commentary I will add another value
00:01:37
sequential reading and by controlling the
00:01:39
value of this change we
00:01:41
will control what code will be
00:01:42
executed either what we have already written
00:01:44
or the
00:01:45
new code that we are now generating
00:01:46
for this we will write conditions if the
00:01:50
reading method is equal to sequential
00:01:57
then this code that
00:01:59
we generated earlier will be executed, otherwise if the
00:02:06
reading method is equal to x children
00:02:12
the course that we are now
00:02:13
important role will be executed the
00:02:15
first step will be similar to the first step
00:02:18
in the first algorithm, that is, at the beginning we
00:02:20
must create an object of the xml reading type and
00:02:22
open the file so as not to write the code again,
00:02:24
I’ll just copy these two lines and so
00:02:28
xml reading is equal to a lot of xml reading and
00:02:30
xml reading by opening the file further in order
00:02:32
to calculate an xml document using the
00:02:34
x child technology, access the
00:02:36
global context property of the factory of their children and
00:02:39
use the read xml method through a dot,
00:02:42
where as the first parameter
00:02:44
you need to pass an object of the xml reading type and
00:02:47
put the result in the
00:02:49
counterparties kicks children variable, save
00:02:54
the changes and put a breakpoint in the
00:02:56
line where the
00:02:58
read xml method is called and look at the contents of the
00:03:01
counterparty variable of their children,
00:03:02
I start the session in debug mode, then
00:03:06
go to the programming
00:03:07
service section, loading data from a file, select the
00:03:10
xml file format,
00:03:11
then select the file itself, clicking on the
00:03:14
read file button, it stops and
00:03:16
executes the line with the read method xml
00:03:20
to see the contents of the
00:03:22
counterparty variable of their children,
00:03:23
I select it and use the key combination
00:03:25
shift f9, we see that the result of reading
00:03:29
this file is an object and code it,
00:03:31
open the properties of this object and see
00:03:34
that there is one property counterparty, the type of
00:03:36
this property is a
00:03:37
list of x children, it is possible to switch
00:03:40
to view mode of this list, for this
00:03:43
we use the command show value in a
00:03:45
separate window, a table opens in
00:03:47
which we see all the data from the xml file in
00:03:50
the form of a table that has a name column, a
00:03:53
column in n.p.
00:03:54
complete and to access the first row of
00:03:59
this table you can use, for example, the
00:04:01
square brackets operator, that is, in
00:04:02
square brackets we indicate the line number of
00:04:05
their values, each row can be
00:04:06
accessed through a dot, that is, this is a
00:04:08
separate object, a
00:04:09
property of this
00:04:10
nobody, this is just the name of the element at the
00:04:13
xml document level, so the first what needs to be
00:04:15
done is to access this list
00:04:17
for this from the expression window I copy this
00:04:20
expression and to view all the
00:04:22
elements of this list we will use
00:04:25
a loop for each as a collection
00:04:28
we indicate the counterparty to anger his
00:04:30
counterparty and as a variable
00:04:32
we will declare some variable
00:04:34
counterparty x children and for each object
00:04:40
we need to do the following add a
00:04:43
new line to the tabular part
00:04:44
new line equals object file data
00:04:47
add and fill in this line
00:04:50
new line name equals to
00:04:55
refer to the name from the file we just
00:04:57
need to indicate after the object name
00:04:59
through a dot
00:05:00
the name of the element, that is, we first turn to the
00:05:03
counterparty variable them children and through a
00:05:05
dot we refer to the name property name
00:05:09
then a new line the
00:05:12
full name is equal to the counterparty
00:05:16
of their children.
00:05:18
full name and the last thing that needs to be
00:05:22
added is the new line winter
00:05:24
equals counterparty x child.
00:05:27
TNT let's save the changes and check the work
00:05:31
of this year, I'm launching it now in 1C
00:05:34
enterprise mode, then we go to
00:05:35
programming service, loading data
00:05:38
from a file, selecting the xml format,
00:05:40
then selecting the file list of contractors,
00:05:42
clicking read the file and we see that
00:05:45
the data has been successfully read, while
00:05:48
the amount of code that we wrote is
00:05:49
significantly less than the amount of
00:05:51
code that we wrote during
00:05:53
sequential reading and
00:05:55
the code itself is more readable and easier to
00:05:58
understand,
00:05:59
so in this video we
00:06:00
looked at another way to read the
00:06:02
document itself
00:06:03
using technology and crap it
00:06:05
again, there are other methods of
00:06:08
reading the documents themselves in in this
00:06:10
course we examined only two of them

Description:

В этом видео рассмотрим как прочитать XML в 1С, используя механизм XDTO (XML Data Transfer Objects). Ещё один способ прочитать XML в 1С: https://www.youtube.com/watch?v=vUqxqO6GwRY #уроки1С#чтениефайлов1с#ironskills#xmlв1с 🔴Записаться на курс "Работа с файлами в 1С": https://ironskills.by/kursi/rabota-s-failami-v-1-c

Preparing download options

popular icon
Popular
hd icon
HD video
audio icon
Only sound
total icon
All
* — If the video is playing in a new tab, go to it, then right-click on the video and select "Save video as..."
** — Link intended for online playback in specialized players

Questions about downloading video

mobile menu iconHow can I download "Как прочитать XML в 1С. Способ № 2 (XDTO)" video?mobile menu icon

  • http://unidownloader.com/ website is the best way to download a video or a separate audio track if you want to do without installing programs and extensions.

  • The UDL Helper extension is a convenient button that is seamlessly integrated into YouTube, Instagram and OK.ru sites for fast content download.

  • UDL Client program (for Windows) is the most powerful solution that supports more than 900 websites, social networks and video hosting sites, as well as any video quality that is available in the source.

  • UDL Lite is a really convenient way to access a website from your mobile device. With its help, you can easily download videos directly to your smartphone.

mobile menu iconWhich format of "Как прочитать XML в 1С. Способ № 2 (XDTO)" video should I choose?mobile menu icon

  • The best quality formats are FullHD (1080p), 2K (1440p), 4K (2160p) and 8K (4320p). The higher the resolution of your screen, the higher the video quality should be. However, there are other factors to consider: download speed, amount of free space, and device performance during playback.

mobile menu iconWhy does my computer freeze when loading a "Как прочитать XML в 1С. Способ № 2 (XDTO)" video?mobile menu icon

  • The browser/computer should not freeze completely! If this happens, please report it with a link to the video. Sometimes videos cannot be downloaded directly in a suitable format, so we have added the ability to convert the file to the desired format. In some cases, this process may actively use computer resources.

mobile menu iconHow can I download "Как прочитать XML в 1С. Способ № 2 (XDTO)" video to my phone?mobile menu icon

  • You can download a video to your smartphone using the website or the PWA application UDL Lite. It is also possible to send a download link via QR code using the UDL Helper extension.

mobile menu iconHow can I download an audio track (music) to MP3 "Как прочитать XML в 1С. Способ № 2 (XDTO)"?mobile menu icon

  • The most convenient way is to use the UDL Client program, which supports converting video to MP3 format. In some cases, MP3 can also be downloaded through the UDL Helper extension.

mobile menu iconHow can I save a frame from a video "Как прочитать XML в 1С. Способ № 2 (XDTO)"?mobile menu icon

  • This feature is available in the UDL Helper extension. Make sure that "Show the video snapshot button" is checked in the settings. A camera icon should appear in the lower right corner of the player to the left of the "Settings" icon. When you click on it, the current frame from the video will be saved to your computer in JPEG format.

mobile menu iconWhat's the price of all this stuff?mobile menu icon

  • It costs nothing. Our services are absolutely free for all users. There are no PRO subscriptions, no restrictions on the number or maximum length of downloaded videos.