1. #1
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    irvinhg is on a distinguished road

      0  

    Default Unanswered: Ext.DomQuery not working with XML namespaces

    Unanswered: Ext.DomQuery not working with XML namespaces


    I'm trying to use Ext.DomQuery to query nodes of an XML document of the sort:

    xmlDoc:
    Code:
    <?xml version="1.0" encoding="UTF-8"?>
    <tns:Definition xmlns:tns="http://definition" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://definitionSchema.xsd ">
        <tns:Name>MyPodDefSample</tns:Name>
        <tns:Version>2013.D0</tns:Version>
        <tns:CreationDate>2012-08-22</tns:CreationDate>
        <tns:Component>
        	<tns:Name>Component1</tns:Name>
        </tns:Component>
    </tns:Definition>
    I want to add basic functionality to it, add, delete, replace, etc.. The problem is that in FireFox I can't get Ext.DomQuery to return anything when querying for a node. For example:

    Code:
     Ext.DomQuery.select('Name',xmlDoc.firstChild);
    returns an empty array, when in Chrome I can get the node.

    Any ideas?

  2. #2
    Sencha User
    Join Date
    Aug 2012
    Posts
    2
    Vote Rating
    0
    irvinhg is on a distinguished road

      0  

    Default


    I found a solution to my problem, I decided to stick with plain old javascript and use:

    Code:
     
    var namespace = 'http://definition'
    xmlDoc.getElementsByTagNameNS(namespace,'Name');
    
    I haven't tested it with IE but it does the trick with FF and Chrome.

Tags for this Thread

Turkiyenin en sevilen filmlerinin yer aldigi xnxx internet sitemiz olan ve porn sex tarzi bir site olan mobil porno izle sitemiz gercekten dillere destan bir durumda herkesin sevdigi bir site olarak tarihe gececege benziyor. Sitenin en belirgin ozelliklerinden birisi de Turkiyede gercekten kaliteli ve muntazam, duzenli porno izle siteleri olmamasidir. Bu yuzden iste. Ayrica en net goruntu kalitesine sahip adresinde yayinlanmaktadir. Mesela diğer sitelerimizden bahsedecek olursak, en iyi hd porno video arşivine sahip bir siteyiz. "The Best anal porn videos and slut anus, big asses movies set..."