RabindraBlr Sahoo

Greenhorn
+ Follow
since Nov 04, 2008
Cows and Likes
Cows
Total received
0
In last 30 days
0
Total given
0
Likes
Total received
0
Received in last 30 days
0
Total given
0
Given in last 30 days
0
Forums and Threads
Scavenger Hunt
expand Ranch Hand Scavenger Hunt
expand Greenhorn Scavenger Hunt

Recent posts by RabindraBlr Sahoo

Hi,

I am validating xml by validate() function provided by XmlBeans. But in my xml there are some tags which are not mentioned in xsd(Schema).
I am able to parse properly with the unwanted tag using XmlObject.Parse(), but the validation fails.

Is there any way to validate only the required tag present in XSD and skipping the unwanted tag.

Thanks in Advance!

Cheers,
Rabindra
Thanks Paul!!!

Is there any option to achive this in the schema(.xsd) itself?

i.e. <xs:any minOccurs="0"/>
However the unwanted tag may come at any sequence and it may be simpletype or complextype. Then i need to decalre <any> tag in each and every position as complex and simpletype.

Is there any simple way to do this

Thanks in advance.

Cheers
Rabindra
Hi Amer,

Thanks for your valuable response!
By using setCompileNoValidation(), it will not validate the xml against the schema at all.
But i need to validate only the mandatory/optional tags and skip the unwanted tags. Is there any option in XmlOptions to achieve this?

Thanks in Advance:)
Thanks,
Rabindra
Hi,

I am validating an xml with schema(.xsd) using xmlbeans provided by apache and it returns the errorlist correctly after validation.
But my requirement is to skip the unwanted tag and proceed for parsing.
Please let me how to achieve this?

Thanks in Advance!!!

Regards,
Rabindra
Thanks Martijn

I resolved the issue by calling the script from a batch file as:
ant -inputhandler com.xyz.CustomInputHandler

Thanks
Rabindra
11 years ago
Thanks Martijn for valuable inputs.

Actually my requirement is to mask the password on ant console. For this i created a custom input handler class(com.xyz.MyInputHandler) which extends org.apache.tools.ant.input.DefaultInputHandler and is masking correctly using the followng command on command prompt/console.

ant -inputhandler com.xyz.MyInputHandler

But i also have some other fileds which doesn't require masking in the ant script, only for password it should mask using MyInputHandler.
So, How can i execute the above command using an ant script file.

Thanks in Advance!!!

Thanks,
Rabindra
11 years ago
Hi,

How to excute ant commandline arguments from a ant script file?
i.e. ant -inputhandler com.sun.MyInputHandler.

If a am executing the above, it is executing properly. However i need to do that from a script file.
In ant 1.7, we can have a nested tag <classname> to give custom inputhandler inside <input> tag. However this is too not working.

Is there any way to do that using ant 1.6 ?

Thanks in advance!!!

Thanks,
Rabindra
11 years ago