Skip to content

Conversation

@thekid
Copy link
Member

@thekid thekid commented Nov 14, 2021

Example

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE binford [
  <!ENTITY euro "&#8364;">
  <!ENTITY name "Binford &more;">
  <!ENTITY more "6100">
  <!ENTITY copy "Copyright">
]>
<binford power="&more;" price=".99 &euro;">&name; - &copy; 2021</binford>

Iteration yields the following:

['/' => 'Binford 6100 - Copyright 2021']
['//@power' => '6100']
['//@price' => '.99 €']

Notes

  • Doesn't support external DTDs and raises exceptions if it encounters these
  • Doesn't support external entities in inline DTDs such as <!ENTITY SYSTEM "http://www.xmlwriter.net/copyright.xml"> for security reasons and ignores these

See #12

@thekid thekid merged commit f2cc274 into master Nov 21, 2021
@thekid thekid deleted the feature/inline-doctype branch November 21, 2021 14:25
@thekid
Copy link
Member Author

thekid commented Nov 21, 2021

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants