Granny's Programming Pearls
"inside of every large program is a small program struggling to get out"
JavaRanch.com/granny.jsp
    Bookmark Topic Watch 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Devaka Cooray
  • Knute Snortum
  • Paul Clapham
  • Tim Cooke
Sheriffs:
  • Liutauras Vilda
  • Jeanne Boyarsky
  • Bear Bibeault
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Ron McLeod
  • Piet Souris
  • Frits Walraven
Bartenders:
  • Ganesh Patekar
  • Tim Holloway
  • salvin francis
  • Mark post as helpful
  • send pies
  • Report post to moderator


Code ExamplesDescription
ByteArrayToDocumentHow to parse a byte array of XML into a DOM Document object
DocumentToByteArrayHow to get a byte array of a given DOM object
DocumentToStringHow to get a string representation of a given DOM object
StringToDocumentHow to parse a string of XML into a DOM Document object
GetElementValueByNameUsingDomHow to retrieve the element value from a DOM Document object given the element name
HowToPrettyPrintXmlWithJava 
HowToPrettyPrintXmlWithXsl 
HowToValidateXmlAgainstSchemaSpecific to the Xerces parser
HowToValidateXmlAgainstAnySchemaUsing JAXP; also works for DTD and Relax-NG schemas
SAXCreateXPathCode that uses the SAX API to create XPath expressions for each element encountered in an XML file



CodeBarn
 
It is sorta covered in the JavaRanch Style Guide.
    Bookmark Topic Watch Topic
  • New Topic
Boost this thread!