# pub.schema.validate

**URL:** <https://techcommunity.softwareag.com/t/pub-schema-validate/125715>\
**Category:** Feedback & ideas\
**Tags:** Discussions-on-this-Forum-System, New-User-Welcome-and-Introductions\
**Created:** [June 4, 2010, 1:54pm UTC](https://techcommunity.softwareag.com/t/pub-schema-validate/125715 "2010-06-04T13:54:11Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![MadhaviChalla](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@MadhaviChalla](https://techcommunity.softwareag.com/u/MadhaviChalla)\
**Post date:** [June 4, 2010, 1:54pm UTC](https://techcommunity.softwareag.com/t/pub-schema-validate/125715/1 "2010-06-04T13:54:11Z")

</div>

Hi,

When iam trying to validate Invalid XMl file with respect to schema it is diplying isvalid “true” and error as “null”.[FONT=PalatinoLinotype-Italic][SIZE=3]  
failIfInvalid parameter is given like default.

please suggest me how can i validate the file

Regards,  
Madhavi Challa  
[/SIZE][/FONT]

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [June 4, 2010, 7:23pm UTC](https://techcommunity.softwareag.com/t/pub-schema-validate/125715/2 "2010-06-04T19:23:04Z")

</div>

In what way is the XML invalid?

---

<div class="post-metadata">

**Author:** ![MadhaviChalla](https://avatars.discourse-cdn.com/v4/letter/m/ecccb3/32.png) [@MadhaviChalla](https://techcommunity.softwareag.com/u/MadhaviChalla)\
**Post date:** [June 4, 2010, 8:35pm UTC](https://techcommunity.softwareag.com/t/pub-schema-validate/125715/3 "2010-06-04T20:35:13Z")

</div>

Structure is different to actuval schema structure.

---

<div class="post-metadata">

**Author:** ![reamon](https://avatars.discourse-cdn.com/v4/letter/r/b77776/32.png) [@reamon](https://techcommunity.softwareag.com/u/reamon)\
**Post date:** [June 5, 2010, 12:16am UTC](https://techcommunity.softwareag.com/t/pub-schema-validate/125715/4 "2010-06-05T00:16:22Z")

</div>

You’ll need to elaborate.

What are you passing to validate? It supports a couple of different ways to validate.

For XML, you’ll want to pass in the node object and the name of the IS schema against which to validate. The schema definition will control whether or not “extra” elements are allowed. Make sure the schema identifies the required and optional elements.
