Good afternoon!
I currently have a dataset with some files that use the following header (I will call it Header1):
<?xml version="1.0" encoding="ISO-8859-1"?><CURRICULO-VITAE SISTEMA-ORIGEM-XML="LATTES_OFFLINE" xmlns:lattes=" http://www.cnpq.br/2001/XSL/Lattes" NUMERO-IDENTIFICADOR="X" DATA-ATUALIZACAO="07122015" HORA-ATUALIZACAO="010008" xsi:schemaLocation=" http://www.cnpq.br/2014/XSD/Lattes/Versao1 CurriculoLattes.xsd" xmlns=" http://www.cnpq.br/2014/XSD/Lattes/Versao1" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance">
Other files use this other header (Header2):
<?xml version="1.0" encoding="UTF-8"?><CURRICULO-VITAE SISTEMA-ORIGEM-XML="LATTES_OFFLINE" DATA-ATUALIZACAO="13072015" HORA-ATUALIZACAO="145233" NUMERO-IDENTIFICADOR="X" xmlns:lattes=" http://www.cnpq.br/2001/XSL/Lattes">
Using the same query, I can extract data from files with Header2, but now with Header1.
I'm only using FLWOR expressions, and the queries are very simple. I've tried with multiple queries, and the result is always the same: I'm able to extract the information I want from files with Header2, but not from the ones with Header1.
I think its a problem with the namespace, but I don't know how to solve it.
Can anyone please help me with that?
Thank you in advance, Ana Victória Ladeira
Hi,
you need to handle the default nsmespace e.g. http://stackoverflow.com/questions/5261204/xquery-on-xml-file-with-namespace
Or try querying with the * wildcard like
//*:MY-ELEM
Br, Max Am 20.02.2016 15:56 schrieb "Ana Victória Ladeira" ladeira.ana@gmail.com:
Good afternoon!
I currently have a dataset with some files that use the following header (I will call it Header1):
<?xml version="1.0" encoding="ISO-8859-1"?><CURRICULO-VITAE
SISTEMA-ORIGEM-XML="LATTES_OFFLINE" xmlns:lattes=" http://www.cnpq.br/2001/XSL/Lattes" NUMERO-IDENTIFICADOR="X" DATA-ATUALIZACAO="07122015" HORA-ATUALIZACAO="010008" xsi:schemaLocation=" http://www.cnpq.br/2014/XSD/Lattes/Versao1 CurriculoLattes.xsd" xmlns=" http://www.cnpq.br/2014/XSD/Lattes/Versao1" xmlns:xsi=" http://www.w3.org/2001/XMLSchema-instance%22%3E
Other files use this other header (Header2):
<?xml version="1.0" encoding="UTF-8"?><CURRICULO-VITAE
SISTEMA-ORIGEM-XML="LATTES_OFFLINE" DATA-ATUALIZACAO="13072015" HORA-ATUALIZACAO="145233" NUMERO-IDENTIFICADOR="X" xmlns:lattes=" http://www.cnpq.br/2001/XSL/Lattes%22%3E
Using the same query, I can extract data from files with Header2, but now with Header1.
I'm only using FLWOR expressions, and the queries are very simple. I've tried with multiple queries, and the result is always the same: I'm able to extract the information I want from files with Header2, but not from the ones with Header1.
I think its a problem with the namespace, but I don't know how to solve it.
Can anyone please help me with that?
Thank you in advance, Ana Victória Ladeira
basex-talk@mailman.uni-konstanz.de