Hey guys!
Recently i’ve started project and have a task:
I have a folder where xml files will be stored with dynamic names.
Each of files has different nodes.
Bot have to read each xml file from a folder, define nodes and create variables for specific nodes which i will set.
The point is i’ve tested it with 2 nodes and 2 variables and it worked fine. But when i defined more variables now i see error during debug process.
Error code: “Assign: Object reference not set to an instance of an object”
what i have:
Type of nodes variables: String
Type of xml output variable during Deserialize - xdocument. tried to change to string but it’s impossible
variable example:
variable_name=var_docxml.Element(“DECLAR”).Element(“DECLARBODY”).Element(“R1000G4”).Value.toString
XML example
<?xml version="1.0" encoding="windows-1251"?> 20068365 J09 001 8 0 1 28 10 12 5 2014 2810 1 03032020 MEDOC 31122014 TOВ "БАСФ Т.О.В." 20068365 8038200000 Товариство з обмеженою відповідальністю 240 Оптова торгівля хімічними продуктами 46.75 бульвар. Дружби Народiв , буд. 19, м. КИЇВ, 01042 5915596 1 31 грудня 2014 0 0 5 0 0 ...I can’t understand where is a problem, cause it worked before.
Could you help me with an advice please?
Thanks!