Rank: Member
Groups: Registered
Joined: 10/1/2020(UTC) Posts: 18 Location: niedersachsen Thanks: 5 times
|
Hi there, During simulation and in xpath builder when I want to run a query I get this error, does anybody has an experience like that. Undefined namespace prefix 'ep1' Details XPST0081: A namespace prefix used in an expression must be expandable into a namespace URI using the statically known namespaces If I run the same query on xml file without namespace then it will be run without problem. The namespaces are as follow in image!!. that means the namespace is defined. Any Idea? Thanks in advanced. tra4tor attached the following image(s):
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
We need your file to answer
|
|
|
|
Rank: Member
Groups: Registered
Joined: 10/1/2020(UTC) Posts: 18 Location: niedersachsen Thanks: 5 times
|
Originally Posted by: bbv We need your file to answer as you run the simulator and press the xpath button and type an xpath statement like $PERSISTENT/Root/Persistent/ep2:EP2_Doc/ep2:ItemizedAbstractList/ep2:ItemizedAbstract[@ID ='IA_2']/@ID and run it it gives the error as mentioned earlier and it happens only when namespace being used. but if the xml file has no name space it work without problem. File Attachment(s): mtd.zip (26kb) downloaded 19 time(s). tra4tor attached the following image(s):
|
|
|
|
Rank: Administration
Groups: Registered, Administrators Joined: 7/21/2014(UTC) Posts: 498
Was thanked: 88 time(s) in 88 post(s)
|
You can help youself by using a wildcard * instead of namespaces, as long as your actual element names are unique.
It would be
$PERSISTENT/Root/Persistent/*:EP2_Doc/*:ItemizedAbstractList/ep2:ItemizedAbstract[@ID ='IA_2']/@ID
|
1 user thanked bbv for this useful post.
|
|
|
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.