Here is an XML document
<?xml version="1.0" encoding="latin1"?>
<taglib xmlns="http://java.sun.com/xml/ns/j2ee">
<tlib-version>0.1.1</tlib-version>
<jsp-version>1.2</jsp-version>
</taglib>
I try selecting the taglib node:
xmlDoc.getRootElement().selectSingleNode("/taglib");
But all I get is null.
If I use prefixes I can get the taglib
SOURCE XML
<?xml version="1.0" encoding="latin1"?>
<tld:taglib xmlns:tld="http://java.sun.com/xml/ns/j2ee">
<tld:tlib-version>0.1.1</tld:tlib-version>
<tld:jsp-version>1.2</tld:jsp-version>
</tld:taglib>
CODE
xmlDoc.getRootElement().selectSingleNode("/tld:taglib");
With Xalan I can use /:taglib to get the taglib in the first
scenario (We already talked about it in previous posting)
It was not standard compliant syntax but my question is
how can I select the taglib in according to the standard.
I tried /taglib[not(contains(name(), ':'))] but that also
returns null.
Maarten Coene
None
None
Public
| Field | Old Value | Date | By |
|---|---|---|---|
| status_id | Open | 2003-06-10 20:54 | maartenc |
| resolution_id | None | 2003-06-10 20:54 | maartenc |
| assigned_to | nobody | 2003-06-10 20:54 | maartenc |
| close_date | - | 2003-06-10 20:54 | maartenc |
Copyright © 2009 Geeknet, Inc. All rights reserved. Terms of Use