attribute-name.js 568 B

123456789101112131415161718192021222324252627282930313233
  1. require(__dirname).test(
  2. { xml: "<root length='12345'></root>"
  3. , expect: [
  4. ["attribute", {
  5. name: "length"
  6. , value: "12345"
  7. , prefix: ""
  8. , local: "length"
  9. , uri: ""
  10. }]
  11. , ["opentag", {
  12. name: "root"
  13. , prefix: ""
  14. , local: "root"
  15. , uri: ""
  16. , attributes: {
  17. length: {
  18. name: "length"
  19. , value: "12345"
  20. , prefix: ""
  21. , local: "length"
  22. , uri: ""
  23. }
  24. }
  25. , ns: {}
  26. , isSelfClosing: false
  27. }]
  28. , ["closetag", "root"]
  29. ]
  30. , strict: true
  31. , opt: { xmlns: true }
  32. }
  33. )