<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>question Re: How to get the reason for invalid XML in Support Questions</title>
    <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/374975#M242217</link>
    <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;Sorry I'm new to nifi&lt;/P&gt;&lt;P&gt;Anyone found a better way to output the xsd error details?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure how to use script to output the error details, please share some ideas. Thanks&lt;/P&gt;</description>
    <pubDate>Sat, 05 Aug 2023 09:47:29 GMT</pubDate>
    <dc:creator>Kevler</dc:creator>
    <dc:date>2023-08-05T09:47:29Z</dc:date>
    <item>
      <title>How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344390#M234158</link>
      <description>&lt;P&gt;When using the ValidateXML processor with an XSD, how do I capture the reason for the invalid XML so I can troubleshoot instances when the incoming XML is invalid?&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Unfortunately I don't have access to a validation tool in the environment where NiFi is running so I need the feedback from the ValidateXML processor.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I appreciate the help.&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 03:19:37 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344390#M234158</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-05-25T03:19:37Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344442#M234170</link>
      <description>&lt;P&gt;The ValidateXML processor will write the error to the attribute "&lt;SPAN&gt;validatexml.invalid.error&lt;/SPAN&gt;". Check for that attribute when the flowfile is directed to the invalid relationship. Hope that helps&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 14:06:45 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344442#M234170</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-05-25T14:06:45Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344445#M234171</link>
      <description>&lt;P&gt;All that attribute reports is "Validation failed".&amp;nbsp; I need to know why it failed and at what line number in the flow file it failed.&amp;nbsp; Is it possible to get this information?&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 14:29:54 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344445#M234171</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-05-25T14:29:54Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344458#M234174</link>
      <description>&lt;P&gt;In this case I would suggest you write custom code through ExecuteScript processor to see if you can retrieve such error message. Not sure what else you can do. sorry&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 15:18:03 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344458#M234174</guid>
      <dc:creator>SAMSAL</dc:creator>
      <dc:date>2022-05-25T15:18:03Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344461#M234175</link>
      <description>&lt;P&gt;OK, thank you for verifying this for me.&lt;/P&gt;</description>
      <pubDate>Wed, 25 May 2022 15:21:36 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/344461#M234175</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-05-25T15:21:36Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767#M235443</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/98065"&gt;@ChuckE&lt;/a&gt;&amp;nbsp;using NiFi 1.15.2 seems to add the error detail in the "validatexml.invalid.error" attribute.&lt;BR /&gt;For example --&amp;gt; "&lt;SPAN&gt;cvc-minLength-valid:&amp;nbsp;Value&amp;nbsp;''&amp;nbsp;with&amp;nbsp;length&amp;nbsp;=&amp;nbsp;'0'&amp;nbsp;is&amp;nbsp;not&amp;nbsp;facet-valid&amp;nbsp;with&amp;nbsp;respect&amp;nbsp;to&amp;nbsp;minLength&amp;nbsp;'1'&amp;nbsp;for&amp;nbsp;type&amp;nbsp;'HotelCode&lt;/SPAN&gt;"&lt;BR /&gt;&lt;BR /&gt;This seems to be an issue starting from NiFi 1.16.3, maybe a bug?&lt;BR /&gt;You can use NiFi 1.15.2 or custom code as&amp;nbsp;&lt;a href="https://community.cloudera.com/t5/user/viewprofilepage/user-id/80381"&gt;@SAMSAL&lt;/a&gt;&amp;nbsp;suggested.&lt;/P&gt;</description>
      <pubDate>Mon, 25 Jul 2022 20:25:10 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348767#M235443</guid>
      <dc:creator>Eduu</dc:creator>
      <dc:date>2022-07-25T20:25:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348915#M235481</link>
      <description>&lt;P&gt;That would be nice, but unfortunately v.1.16.x&amp;nbsp; doesn't incorporate this feature and all you get is a generic message: "Validation Failed".&amp;nbsp; In the end I just resorted to downloading the problem flowfile from the queue, and then used xmllint to run a validation, which gave me the answer instantly.&amp;nbsp; But it would be really nice if the developers put the error message back into the "validatexml.invalid.error" attribute in v.1.16.x&lt;/P&gt;</description>
      <pubDate>Wed, 27 Jul 2022 17:05:20 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/348915#M235481</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2022-07-27T17:05:20Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/374975#M242217</link>
      <description>&lt;P&gt;Hi all&lt;/P&gt;&lt;P&gt;Sorry I'm new to nifi&lt;/P&gt;&lt;P&gt;Anyone found a better way to output the xsd error details?&amp;nbsp;&lt;/P&gt;&lt;P&gt;Not sure how to use script to output the error details, please share some ideas. Thanks&lt;/P&gt;</description>
      <pubDate>Sat, 05 Aug 2023 09:47:29 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/374975#M242217</guid>
      <dc:creator>Kevler</dc:creator>
      <dc:date>2023-08-05T09:47:29Z</dc:date>
    </item>
    <item>
      <title>Re: How to get the reason for invalid XML</title>
      <link>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/375002#M242239</link>
      <description>&lt;P&gt;Are you referring to validation failures?&amp;nbsp; If this is what you are referring to then the answer is, you can't.&amp;nbsp; If you get failures then you'll need to queue the failures up and validate them manually to see why they failed.&amp;nbsp; I use xmllint.&amp;nbsp; For example:&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;xmllint --noout --schema my_data_schema.xsd my_data.xml&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 07 Aug 2023 15:51:38 GMT</pubDate>
      <guid>https://community.cloudera.com/t5/Support-Questions/How-to-get-the-reason-for-invalid-XML/m-p/375002#M242239</guid>
      <dc:creator>ChuckE</dc:creator>
      <dc:date>2023-08-07T15:51:38Z</dc:date>
    </item>
  </channel>
</rss>

