txmldoc_parsefile.bmx 527 B

123456789101112131415161718192021222324252627282930313233
  1. SuperStrict
  2. Framework Text.xml
  3. Import brl.standardio
  4. Import brl.ramstream
  5. Incbin "sample.xml"
  6. Local doc:TxmlDoc = TxmlDoc.parseFile("sample.xml")
  7. If doc Then
  8. Print "~nFilename :"
  9. doc.savefile("-")
  10. doc.Free()
  11. End If
  12. Local stream:TStream = ReadStream("sample.xml")
  13. doc = TxmlDoc.parseFile(stream)
  14. If doc Then
  15. Print "~nStream :"
  16. doc.savefile("-")
  17. doc.Free()
  18. End If
  19. stream = ReadStream("incbin::sample.xml")
  20. doc = TxmlDoc.parseFile(stream)
  21. If doc Then
  22. Print "~nIncbin Stream :"
  23. doc.savefile("-")
  24. doc.Free()
  25. End If