I am trying to navigate through an instance
by using XPath. I am providing below an excerpt of the original instance
:
<?xml version="1.0" encoding="US-ASCII"?>
<xbrli:xbrl xmlns:ann="http://www.anninc.com/20140201"
xmlns:dei="http://xbrl.sec.gov/dei/2013-01-31"
xmlns:iso4217="http://www.xbrl.org/2003/iso4217"
xmlns:link="http://www.xbrl.org/2003/linkbase"
xmlns:us-gaap="http://fasb.org/us-gaap/2013-01-31"
xmlns:xbrldi="http://xbrl.org/2006/xbrldi"
xmlns:xbrli="http://www.xbrl.org/2003/instance"
xmlns:xlink="http://www.w3.org/1999/xlink"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<link:schemaRef xlink:href="ann-20140201.xsd"
xlink:type="simple" />
<xbrli:context id="FD2011Q4YTD">
<xbrli:entity>
<xbrli:identifier scheme="http://www.sec.gov/CIK"
>0000874214</xbrli:identifier>
</xbrli:entity>
<xbrli:period>
<xbrli:startDate>2011-01-30</xbrli:startDate>
<xbrli:endDate>2012-01-28</xbrli:endDate>
</xbrli:period>
</xbrli:context>
<xbrli:context id="FD2011Q4YTD_ann_EarningsPerShareReconciliationAxis_ann_EarningsPerShareBasic.Member">
<xbrli:entity>
I am aware that the root element
has a namespace
inside. I am using BaseX GUI. According to previous help my root element
is {http://xbrl.org/2003/instance}xbrl
!
However when i am trying it on an XPath expression like this:
xquery doc("ann-20140201.xml")//{http://xbrl.org/2003/instance}xbrl
and i hit Execute Query i am getting:
Error:
Stopped at C:/Users/Μαρίνος/Desktop/ann-20140201.xml, 1/6:
[XPST0003] Processing instruction has illegal name: 'xml'.
What am i doing wrong? Also i have been advised to use:
declare namespace xbrli=http://xbrl.org/2003/instance;
I am inputting this command from the GUI and i input
the command
here (do i input the declaration command here?):
BUT i am still getting the same error
message as seen above. What must i do with the illegal name: xml
?
EDIT_1
wst says use Q
with Clark Notation:
xquery doc("ann-20140201.xml")//Q{http://xbrl.org/2003/instance}xbrl
--> If i hit run it executes with no error. However instead of getting the root element
in the Result
pane on BaseX as i get it with this command:
XQUERY doc("ann-20140201.xml")//*
I get nothing; why that? Also how do i declare a namespace?