jQWidgets Forums

jQuery UI Widgets Forums Grid Strange XML parsing error

Tagged: 

This topic contains 1 reply, has 2 voices, and was last updated by  Peter Stoev 10 years, 5 months ago.

Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
  • Strange XML parsing error #64327

    fdski
    Participant
    var source =
                {datatype: "xml",
                datafields: [
    					{ name: 'PNazwa', map: 'PodmiotZobowiazany>[Nazwa]', type: 'string' },
    					{ name: 'PUlicaNumer', map: 'PodmiotZobowiazany>[UlicaNumer]', type: 'string' },
    					{ name: 'PKodPocztowy', map: 'PodmiotZobowiazany>[KodPocztowy]', type: 'string' },
    					{ name: 'PMiejscowosc', map: 'PodmiotZobowiazany>[Miejscowosc]', type: 'string' },
    					{ name: 'PNip', map: 'PodmiotZobowiazany>[Nip]', type: 'string' },
    					{ name: 'PRegon', map: 'PodmiotZobowiazany>[Regon]', type: 'string' },
    					{ name: 'ZNazwa', map: 'Zglaszajacy>[Nazwa]', type: 'string' },
    					{ name: 'ZUlicaNumer', map: 'Zglaszajacy>[UlicaNumer]', type: 'string' },
    					{ name: 'ZKodPocztowy', map: 'Zglaszajacy>[KodPocztowy]', type: 'string' },
    					{ name: 'ZMiejscowosc', map: 'Zglaszajacy>[Miejscowosc]', type: 'string' },
    					{ name: 'ZNip', map: 'Zglaszajacy>[Nip]', type: 'string' },
    					{ name: 'ZRegon', map: 'Zglaszajacy>[Regon]', type: 'string' },
    		        		{ name: 'LacznaWartoscFaktur', map: '[LacznaWartoscFaktur]', type: 'string' },
    					{ name: 'LacznaWartoscStatystyczna', map: '[LacznaWartoscStatystyczna]', type: 'string' },
    					{ name: 'LacznaLiczbaPozycji', map: '[LacznaLiczbaPozycji]', type: 'string' },
    					{ name: 'ZTyp', map: '[Typ]', type: 'string' },
    					{ name: 'ZNumer', map: '[Numer]', type: 'string' },
    					{ name: 'ZRok', map: '[Rok]', type: 'string' },
    					{ name: 'ZMiesiac', map: '[Miesiac]', type: 'string' }
    					
    				],
    				root: "Deklaracja",
    				//record: "Wypelniajacy",
    				//id: 'PozId',
                    localdata: DocXML
    		    };

    XML – <PodmiotZobowiazany> is required. <Zglaszajacy> is optional.
    Attribute Miejscowosc exists on <Deklaracja> as well as <Deklaracja><Zglaszajacy>.
    If Zglaszajacy does not exist this line of code
    { name: ‘ZMiejscowosc’, map: ‘Zglaszajacy>[Miejscowosc]’, type: ‘string’ },
    will pull out <Dekaracja>[Miejscowosc] where it should have null.

    Any ideas ?

    Strange XML parsing error #64328

    Peter Stoev
    Keymaster

    Hello fdski,

    The provided information is not sufficient for testing. Please, provide a Full sample or post a jsfiddle.net link to a sample which illustrates an issue with your app. If your XML is valid XML file and your Grid’s initialization is correct, there would not be a problem. To learn how to data bind jqxGrid to XML, take a look at :http://www.jqwidgets.com/jquery-widgets-documentation/documentation/jqxgrid/jquery-grid-datasources.htm

    Best Regards,
    Peter Stoev

    jQWidgets Team
    http://www.jqwidgets.com

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic.