🏷️

XML Parser Guide

Verified

by Community

Guides you through parsing XML documents using DOM, SAX, and streaming parsers across different programming languages. Covers XPath queries, namespaces, schema validation, and XSLT transformations.

xmlparsingxpathxsltdata

XML Parser Guide

Helps you parse and manipulate XML documents using DOM, SAX, and streaming parsers across multiple languages.

Usage

Ask for help parsing XML, writing XPath queries, or transforming XML data.

Examples

  • "Parse this XML file and extract all product names"
  • "Write an XPath query to find nodes with a specific attribute"
  • "Convert this XML to JSON preserving the hierarchy"

Guidelines

  • Use streaming parsers (SAX) for large XML files to conserve memory
  • Handle XML namespaces explicitly in XPath queries
  • Validate against XSD schemas before processing
  • Sanitize XML input to prevent XXE injection attacks
  • Use proper encoding declarations for international content