Hello, could anybody tell me how to parse XML file inside a JSF page?
The thing's that I've got XML file and want to put some data from it into my JSF page. My first thought was to include JSTL Core and XML libs and to do something like this:
<c:import var="some-info-doc" src="some-info.xml" />
<x:parse var="some-info-xml" xml="some-info-doc" />
<h:outputText>
<x:out select="$some-info-xml/a-piece-of-data" />
</h:outputText>
However, this code resulted in error. c:import was not recognized. So, I decided to play with a local piece of XML:
<x:parse var="simple">
<child>basic</child>
</x:parse>
<h:outputText>
<x:out select="$simple/child" />
</h:outputText>
This led to the child tag being printed in the result page. And the output came from the x:parse tag, not h:output.
So that, is there any alternative to parse XML inside a JSF page (not including XML being sent as an object from a certain by-me-written module)? Or are there any errors in my code?