Class XmlDeserializer
java.lang.Object
com._1c.g5.v8.dt.internal.compare.xml.XmlDeserializer
- All Implemented Interfaces:
Closeable
,AutoCloseable
The merge settings deserializer.
Works with XML files serialized by
IMergeSettingsSerializerService#serialize()
.-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
XmlDeserializer
Creates deserializer instance.- Parameters:
inputStream
- the stream containing the serialized xml.- Throws:
XMLStreamException
- the file has an incorrect format.
-
-
Method Details
-
hasNext
Check for the existence of unread elements of the xml file.- Returns:
true
Check for the existence of unread elements of the xml file,false
if the end of the file is reached.- Throws:
XMLStreamException
- the file has an incorrect format.
-
next
Reading the next element of the xml file.- Returns:
- The next element of the xml document is the corresponding tag, cannot be
null
. Precondition: the cursor has not reached the end of the file. Postcondition: the cursor is shifted to the next tag. - Throws:
XMLStreamException
- the file has an incorrect format or reached end of file.
-
skipToTag
Moves the cursor to the tag specified by the input data.- Returns:
- The xml element of the document corresponding to the specified tag, cannot be
null
. Precondition: the cursor has not reached the end of the file, input tag is present in the file. Postcondition: the cursor is shifted to the first position of the input tag. - Throws:
XMLStreamException
- the file has an incorrect format or there is no input tag in the file.
-
close
public void close()Closes the input stream associated with the file.- Specified by:
close
in interfaceAutoCloseable
- Specified by:
close
in interfaceCloseable
-