• 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
  • Liutauras Vilda
  • Paul Clapham
Sheriffs:
  • paul wheaton
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Piet Souris
Bartenders:
  • Mike London

Positioning DocType with transformer

 
Greenhorn
Posts: 8
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,
I'm trying to read an XML by creating a Document with the DOM parser. I make some changes there and then write it back using the Transformer class. When this class writes the Document, the <Doctype ...> tag is appearing after the initial comment, but I want it before the comment as my Flex is throwing a SAXException because of that.

Original XML -

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE .....>
<!-- The comment is here>



Output -

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- The comment is here>
<!DOCTYPE .....>



Is there any way I can manually position the DOCTYPE?
Thanks
Kshitij
 
reply
    Bookmark Topic Watch Topic
  • New Topic