xml - How to treat nodes with xlmns? -
i have xml:
<?xml version="1.0"?> <arquivoposicao_4_01 xmlns:xsi="http://www.w3.org/2001/xmlschema-instance" xmlns:xsd="http://www.w3.org/2001/xmlschema"> <fundo xmlns="http://tempuri.org/">
i informations of node <fundo>
, have xmls came above: <fundo xmlns="http://tempuri.org/">
how can <xsl:for-each select="fundo">
when exists namespace that?
you need declare namespace prefix , use qualify xpath selectors elements part of namespace. can adding xmlns
declaration xsl:stylesheet
, prefix:
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/xsl/transform" xmlns:ns1="http://tempuri.org/"> <!-- add declaration -->
now select fundo
qualifying selector prefix declared. in example using ns1:fundo
:
<xsl:for-each select="ns1:fundo"> ...
Comments
Post a Comment