FB_XmlRead Troubleshooting

Troubleshooting

This table describes some general issues and their solutions:

Issue

Cause

Solution

Execution ends with a detected error and result indicates FilePathInvalid.

  • The specified file or the directory is not available.

  • The given file path has invalid syntax.

  • Verify that the file exists under the specified directory. In case the file path targets extended memory (such as an SD memory card), verify that it is available.

  • Verify that the syntax used is supported by your particular controller.

    For example, your controller may support '\' as a separator, while another controller supports '/' instead.

Execution ends with a detected error and result indicates FileInvalid.

  • The file contains characters outside the ASCII range.

  • During parsing, an invalid closing tag has been detected.

  • Verify that the file contains only ASCII characters.

  • Verify that the XML file is valid: Make sure that each open tag is closed and that the elements are properly nested.

    NOTE: Element names are case-sensitive.

Execution ends with a detected error and result indicates XPathExpressionInvalid.

  • The entered XPath expression is invalid or not supported.

  • Verify the correct syntax of the XPath expression.

Execution ends with a detected error and result indicates NumOfParentsExceeded.

  • The nesting depth of elements in the XML file to read is larger than specified.

  • Increase the value for the parameter Gc_udiXmlMaxNumOfParents in the GPL.

  • Avoid the use of files with deeply nested XML structures.

Execution ends with a detected error and result indicates BufferFull.

  • The number of items in the XML file to read is greater than the size of the buffer provided by the application.

  • Increase the buffer size by the parameter Gc_XmlMaxNumOfItems in the GPL.

  • Split the read operation in several blocks. Use an appropriate XPath expression to limit the number of elements to read per block.

Execution ends with a detected error and result indicates ElementNotFound.

  • The element specified in the XPath expression does not exist in the file.

  • The path declaration in the XPath expression does not match the structure in the XML file.

  • There is a typing error in the XPath expression.

  • Verify that the specified element is typed correctly.

  • Verify that the path declaration meets the expected structure in the XML file.

  • Verify that the correct XML file is specified with the parameter i_sFilePath.

Execution ends with a detected error and result indicates FileInconsistent.

  • The end of file has been reached but at least one tag has not been closed.

  • Verify that the XML file is valid: Make sure that each open tag is closed and that the elements are properly nested.