XML XSL reference in Java


I have some XML files that I want to transform using an XSL file referenced inside the XML.

The XSL can be different for each XML file so taking it out of each XML file is important to know which to use for transforming the XML to XHTML.

The XSL file is referenced in the xml-stylesheet tag as shown in the example XML file below.

example XML file:
<?xml version="1.0"?>

<?xml-stylesheet type="text/xsl" href="pcs_to_html.xsl"?>


There are many parsing classes available in Java for XML. I just have had trouble finding one that would extract the xml-stylesheet tag.

Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!