View Full Version : Problem reading XML structure

22 Apr 2008, 5:19 AM
Is it not possible, to read a XML structure like this:

<createdate>2007-08-08 11:30:26</createdate>
<updatedate>2008-04-09 12:02:38</updatedate>
<prod_geber id="81">Gothaer</prod_geber>
<prod_typ id="6">Hausrat</prod_typ>
<prod_typ2 id="6">Hausrat</prod_typ2>
<prod_vorgang id="2">Deckungsaufgabe</prod_vorgang>
<product_instance xmlns:p="url" xmlns:fi="url" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:gothaer="url">
<p:Name>Gothaer AG Hausrat V2</p:Name>
</sftable> I have the problems with the <p:product> node.

In the reader, the mapping is declared as the following:

reader: new Ext.data.XmlReader({
// records will have an "Item" tag
record: 'sfrec',
id: 'id',
//totalRecords: '@total'
}, [
// set up the fields mapping into the xml doc
// The first needs mapping, the others are very basic
{name: 'send_date', mapping: 'sfextdata > process > item > send_date'},
{name: 'prod_geber', mapping: 'sfextdata > product_info > description > prod_geber'},
{name: 'prod_typ', mapping: 'sfextdata > product_info > description > prod_typ'},
{name: 'prod_vorgang', mapping: 'sfextdata > product_info > description > prod_vorgang'},
{name: 'version', mapping: 'sfextdata > product_instance > product > head > Version'}
])I have tried the mapping also like this:

{name: 'version', mapping: 'sfextdata > product_instance > p:product > p:head > Version'}The dataindex 'version' is always empty.

Can anybody help?

22 Apr 2008, 5:21 AM
DomQuery doesn't do namespaces.