Xpath, alle Element die mit "user" beginnen auswäh

Status
Nicht offen für weitere Antworten.
X

XPathGast

Gast
Hallo zusammen,

ich suche nun leider schon ne ganze Weile aber ich bekomme dies einfach nicht hin.

Ich habe ein JDOM Document vorliegen, und möchte dieses mittels xpath durchsuchen.
Die Ergebnisliste soll alle Elemente enthalten sie mit user beginnen. Diese Elemente können überall im ganzen JDOM Baum vorkommen. Hat jemand eine Idee? Dies war bisher mein bester Einfall.


Code:
XPath xpath = XPath.newInstance("matches(., 'user')");
List<Element> noneElements = xpath.selectNodes(doc);
/* doc ist vom Typ: org.jdom.Document
   xpath: org.jdom.xpath.XPath
*/

Dabei bekomme ich folgende Exception:
org.jdom.JDOMException: XPath error while evaluating "matches(self::node(), "user")": Function :matches: Function :matches


Hoffentlich hat jemand ne gute Idee.
In meinem Projekt verwende ich JDOM v1.1

Dankeschön
 
Status
Nicht offen für weitere Antworten.
Ähnliche Java Themen
  Titel Forum Antworten Datum
C XPath: Alle Kinder in einer Schleife auslesen XML & JSON 2
Kirby.exe Probleme mit XML XPATH Select XML & JSON 3
B XPath soll XML liefern XML & JSON 7
O XPATH Problem - Anfänger XML & JSON 4
M dom4j unberechtigte Invalid XPath expression XML & JSON 12
W XPath schreiben XML & JSON 1
P HTML XPath XML & JSON 1
S Ersatz für die veraltete Klasse XPath XML & JSON 1
P Xpath zugriff auf Attribute XML & JSON 3
P "XPath is deprecated" XML eclipse XML & JSON 3
G HtmlUnit XPath XML & JSON 5
D XPath-Query XML & JSON 2
I XPath Namensräume und auslesen einzelner Knoten XML & JSON 3
AMStyles XPATH Befehl SVG Java XML & JSON 2
G xpath: in Kindelement zwei Attribut-Werte auslesen XML & JSON 2
G xpath: Inhalt eines Kindelements auslesen XML & JSON 2
H ChildNode via XPath ansprechen XML & JSON 2
G JDOM - aus Children-Liste ein Child direkt ansprechen ohne XPath? XML & JSON 9
S Attribute von Elementen auslesen mit XPath XML & JSON 2
T Xpath & JDOM Element Pfad ausgeben XML & JSON 2
W XPath + Inhalt aus <td> XML & JSON 2
R XPath - frage zur Adressierung XML & JSON 3
reibi XPath XML & JSON 14
M xPath liefert leeres Nodeset XML & JSON 2
M Probleme mit XPath bei Java XML & JSON 5
W Element mit XPath @id ermitteln wenn nur ein teil der id bekannt ist XML & JSON 2
F XPath-Problem mit DOM4J XML & JSON 8
T XPath Problem: finden einer Node nach Attributswert XML & JSON 2
O XPATH gesucht XML & JSON 6
G XPATH-Frage XML & JSON 2
L Element manipulieren in einem DOMResult per XPath XML & JSON 10
P XPath und Namespaces XML & JSON 3
G XPath - replace function funktioniert nicht XML & JSON 3
E XPATH-Ausdruck mit not XML & JSON 4
E Wieso liefert dieser XPATH-Ausdruck nicht die richtige Anzahl Treffer? XML & JSON 8
M XPath Ausdruck validieren XML & JSON 2
N XPath Adressierung XML & JSON 7
F XPath frage XML & JSON 4
B Optionaler XPath pfad XML & JSON 2
B XPath frage XML & JSON 2
T Frage zu XQuery (XQJ) / XPath XML & JSON 2
P XPath Problem XML & JSON 2
S Problem mit XPath XML & JSON 4
T Mit XPATH finden und dann änder XML & JSON 2
T EXSD auslesen mit XPath und JDOM XML & JSON 8
G XPath gesucht für Tag mit konkretem Content XML & JSON 2
A XPath Problem XML & JSON 2
C XPath in JDOM klappt nicht XML & JSON 2
T Prbolem XPath XML & JSON 2
loadbrain XPath Problem XML & JSON 2
M brauche große XML-Datei für XPath-Tests XML & JSON 4
M JDOM und XPath, zu Element zugehörigen XPath-Ausdruck XML & JSON 5
F JDOM und XPath - Problem mit Namespace ohne Prefix XML & JSON 5
F hilfe bei xpath-ausdruck XML & JSON 2
K java + xpath -> performanceproblem XML & JSON 9
H Xpath kindelemente auslesen XML & JSON 2
S Xml zurück in xpath wandeln XML & JSON 8
G Frage zu XPath XML & JSON 2
flashfactor Filtern mittels XPATH XML & JSON 4
M XSL/XPath - Nur ersten Wert mit selben Attribut XML & JSON 4
M XPath Problem im Zusammenhang mit document() XML & JSON 2
M Frag zu xsl:when beziehungsweise XPath XML & JSON 3
F JDom und XPath XML & JSON 12
C xpath funktioniert nicht XML & JSON 5
M XPATH und RSS (Problem namespaces) XML & JSON 7
P nochmal XPath :-) XML & JSON 22
P XPath . XML & JSON 2
T Rekursiver Verzeichniss Baum in XML & XPath XML & JSON 4
clemson xpath mit jdom XML & JSON 2
Wildcard xpath Parser XML & JSON 8
B Xml speichern - müssen alle Klassen deklariert werden? XML & JSON 12
S NodeList rückwärts scannen, alle Parent Nodes ausgeben rekursiv und nicht-reukrsiv XML & JSON 0
N Alle namespaces ins Root Element hinauf ziehen XML & JSON 2
N Alle namespaces ins Root Element hinauf ziehen XML & JSON 2
T xsl schleife alle kindeelemtente eines elternelementes durchlaufen XML & JSON 2
E EMF Modell um alle möglichen Attribute auszulesen XML & JSON 12
T XML prüfen mit XSD => Alle Fehler auflisten XML & JSON 7
M getChildren gibt nicht alle children zurück XML & JSON 3
8u3631984 jaxb XML Mapper - Root Element mit Attribut XML & JSON 20
B DOMParser - Element filtern XML & JSON 1
N jdom2 - Referenz auf Nested Element XML & JSON 2
H XML Element `Class` wird nicht gelesen XML & JSON 2
F xml Element ersetzen XML & JSON 5
M Text eines Elements in XML Datei mit JAVA bearbeiten und kompletten Element-Zweig hinzufügen XML & JSON 16
W XML-Element komplett löschen XML & JSON 5
L XML nur ein Element einlesen XML & JSON 2
R XSD in einer choice mehrmals das selbe element möglich XML & JSON 5
S JDom XML ein Element hinzufügen. XML & JSON 1
ARadauer xsd ref auf element oder typen verwenden? XML & JSON 2
R cvc-complex-type.3.2.2: Attribute 'uuid' is not allowed to appear in element 'jasperReport'. XML & JSON 4
F EMF, XSD to ECore mapping, Attribute vs. Element XML & JSON 2
C xml validierung gegen xsd mit jdom: Fehlermeldung Cannot find the declaration of element ... XML & JSON 8
Landei JAXB: Wert von übergeordneten Element XML & JSON 4
S Validierung mit JAXB2 ohne root-element XML & JSON 10
E xml Element sortieren XML & JSON 2
Z XML parsen - Element mit Werten XML & JSON 2
enne87 Element-Werte werden falsch ausgelesen XML & JSON 2
M XSD - Child Element möglich, aber nicht zwingend erforderlich XML & JSON 6
N Individuelles Wrapper-Element um Collection mit JAXB XML & JSON 6
R Element - Ausgeben von Kommentar XML & JSON 4

Ähnliche Java Themen

Neue Themen


Oben