• Skip to main content
  • Skip to search
  • Skip to footer
Cadence Home
  • This search text may be transcribed, used, stored, or accessed by our third-party service providers per our Cookie Policy and Privacy Policy.

  1. Community Forums
  2. Custom IC SKILL
  3. XML Parser

Stats

  • Locked Locked
  • Replies 5
  • Subscribers 144
  • Views 17336
  • Members are here 0
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

XML Parser

Curtisma
Curtisma over 7 years ago

What's the best way to parse an XML file into a SKILL or SKILL++ data structure?

I found an old post, listed below, on parsing xml files using xsltproc.  However I am receiving errors about the xslt file when I test it on an example xml file.  Is there an updated version of this xslt file available?

https://community.cadence.com/cadence_technology_forums/f/custom-ic-skill/12948/xml-in-skill/19209#19209

I've also seen suggestions that a LISP xml parser be used.  Does anybody have any experience with going this route?  Have you tried to use the closure xml parser for it?

common-lisp.net/.../

-Curtis

  • Cancel
Parents
  • henker
    henker over 7 years ago

    The attachment is a xml reader in Skill that I did as proof-of-concept for automatic parser generation some time ago. The parser itself is of LALR1 type, automata of lexer and parser are generated directly from EBNF. The grammar is visible in the comments at the reduce rules and should cover all of XML1.0 and probably also most of XML1.1 spec (not tested though), but is limited to 8bit extended ASCII characters only.

    The reductions are manually written to generate disembodied property lists (and lists of those) out of parsed xml nodes/content/attributes. This could be modified to build plain lists, tables, or whatever structure is needed.

    Usage is to call it with the xml in a string or a filename. An optional callback can be given to enable somewhat similar to SAX mode.

    5852.xml.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Reply
  • henker
    henker over 7 years ago

    The attachment is a xml reader in Skill that I did as proof-of-concept for automatic parser generation some time ago. The parser itself is of LALR1 type, automata of lexer and parser are generated directly from EBNF. The grammar is visible in the comments at the reduce rules and should cover all of XML1.0 and probably also most of XML1.1 spec (not tested though), but is limited to 8bit extended ASCII characters only.

    The reductions are manually written to generate disembodied property lists (and lists of those) out of parsed xml nodes/content/attributes. This could be modified to build plain lists, tables, or whatever structure is needed.

    Usage is to call it with the xml in a string or a filename. An optional callback can be given to enable somewhat similar to SAX mode.

    5852.xml.zip

    • Cancel
    • Vote Up 0 Vote Down
    • Cancel
Children
No Data

Community Guidelines

The Cadence Design Communities support Cadence users and technologists interacting to exchange ideas, news, technical information, and best practices to solve problems and get the most from Cadence technology. The community is open to everyone, and to provide the most value, we require participants to follow our Community Guidelines that facilitate a quality exchange of ideas and information. By accessing, contributing, using or downloading any materials from the site, you agree to be bound by the full Community Guidelines.

© 2025 Cadence Design Systems, Inc. All Rights Reserved.

  • Terms of Use
  • Privacy
  • Cookie Policy
  • US Trademarks
  • Do Not Sell or Share My Personal Information