Remove Element Without Child Nodes

Tag(s):

<?xml version="1.0" encoding="UTF-8"?>
<!-- Remove Element Without Child Nodes -->

Remove Namespace

Tag(s):

<?xml version="1.0" encoding="UTF-8"?>
<!-- Remove Namespace -->

Remove attributes or / and nodes

Tag(s):

<?xml version="1.0" encoding="UTF-8"?>
<!-- Remove unwanted attributes or/and nodes -->

How to handle apostrophe and quote in XSLT

Tag(s):

The XML sample

Using XPath's text() function

Tag(s):

The XML file:

xmllint

Tag(s):

# Validate xml using XSD file.
xmllint --noout --schema yourSchema.xsd yourXmlFile.xml >> results.log 2>&1

xsltproc

Tag(s):

Description xsltproc is a command line XSLT processor. It is used to apply XSL sheet on XML files.

Commands To get all options available for xsltproc, run

xsltproc --help

Apply XSL sheet on XML file:

xsltproc Data.xsl Data.xml > Data.output.txt

Passing string parameters into XSL sheet:

Hibernate

Tag(s):

In Eclipse, include the following JARs:

Data type int, double, float are not nullable

Tag(s):

When you use primitive data types(i.e int, double and float) with hibernate, you will not be able to convert them to null because Java doesn't allow them to be null. In order for these data types to be null, use their object counter part.(i.e Integer, Double, Float). However, it is very expensive to use the object data type. Therefore, use them only when needed.

SQL IN() operator

Tag(s):

Here is an example of how you define a list of values in hibernate for the SQL IN() operator:

Pages

Subscribe to OpenWritings.net RSS