Declaring attribute namespace in xPath expression



my XML is:



<?xml version="1.0" encoding="utf-16"?>
<LauncherInfo xmlns:xsi="http://ift.tt/ra1lAU" xmlns:xsd="http://ift.tt/tphNwY" xmlns="http://ift.tt/1vC7NUZ" hash="d8bf41f6053ab2df28704dfcda443f9199546d3b">
<File Name="parakstitais.edoc" Location="vieta_kur_saglabat" />
<Action xsi:type="CreateNewSignAction">
<FileReferences>
<FileReference Name="Document1.doc" Address=some url" />
<FileReference Name="Scan7.pdf" Address="some url" />
<FileReference Name="Scan8.pdf" Address=some url" />
</FileReferences>
</Action>
</LauncherInfo>


And idea is to receive all part, so i am compiling Xpath expression



xpath.compile("LauncherInfo/Action");


and an error appears: Namespace for prefix 'xsi' has not been declared. Is there any way to define namespace uri inside xPath expression?


No comments:

Post a Comment