• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

error coming while creating xml

 
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
[Fatal Error] :1:982: Element type "package" must be followed by either attribute specifications, ">" or "/>".
Wrong XML file structure: Element type "package" must be followed by either attribute specifications, ">" or "/>".


i m using the following xml...

"<AvailablePackages>"
+ "<package packageName='NEW DELHI-MATARANI PACKAGE' packageCode='NDR00001' duration='3 Nights/4 Days' description='One of the holiest Hindu temples, the shrine of Vaishno Devi is dedicated to the Goddess Shakti. Affectionately also called as Mata Rani and Vaishnavi, the temple is the manifestation of the Mother Goddess. The temple is situated at an titleitude of 5200 ft., a distance of approx. 12 kms from Katra.' packageKeyname='vaishno-devi-package-tour' packageType='VAT'/>"
+ "<package packageName='NEW DELHI-SHIRDI PACKAGE' packageCode='NDR0023' duration='3 Nights / 4 Days' description='IRCTC proudly announces to relaunch SHIRDI PACKAGE with Charter Operations .Lord Sai Baba one of the most famous saints of India endowed with unprece dented powers and worshipped as a God incarnate. The life of Sai Baba is as wide and as deep as the infinite ocean; all can dive deep into it and take out precious gems in terms of knowledge and bhakti and distribute them.'packageKeyname='shirdi-package-tour' packageType='VAT'/>"
+ "</AvailablePackages>"


whn i m using the single tag of package it is working fine.....
 
Author and all-around good cowpoke
Posts: 13078
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Putting bulk text into attributes as you have done just about guarantees trouble.

Bulk text is best handled in its own element as CDATA

I am assuming your XML does not really start with quote marks and what we see is due to the way you posted it. the Code tags should be used to show literal XML.

Bill
 
Marshal
Posts: 28226
95
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
It just isn't well-formatted, that's all. Perhaps you have a misplaced quote somewhere. Perhaps you don't have spaces between the attributes. Scan through that data carefully to find the problem.
 
jyoti mahajan
Greenhorn
Posts: 27
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks Friends....prob was solved...as space was not given in the attributes..
thks for your suggestion

Regards
Jyoti Mahajan
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic