pharo-contributions / XML-XMLParser

XML Parser for Pharo
MIT License
11 stars 17 forks source link

Migrate GTExtensions package to NewTools #5

Closed tinchodias closed 1 year ago

tinchodias commented 2 years ago

The extension package is not trivial but we should have at least some basic tree of nodes in the Pharo 10 inspector.

tinchodias commented 2 years ago

I took a glance at the GTExtensions package and most of the code there seems to be not GT-related but a highlighter.

I tried how simple was to use that highlighter in a Pharo 10 and had this error: "XMLFileException: (XMLFileException) File reading unsupported"

To reproduce:

  1. Load default metacello in P10.
  2. Manually load the package using Iceberg.
  3. Evaluate:
    
    xmlFileReference := 'test.xml' asFileReference.
    xmlFileReference writeStreamDo: [ :aStream |
    aStream nextPutAll:
        '<?xml version="1.0" encoding="UTF-8"?>
    <countries>
      <country code="af" handle="afghanistan" continent="asia" iso="4">Afghanistan</country>
      <country code="al" handle="albania" continent="europe" iso="8">Albania</country>
      <country code="dz" handle="algeria" continent="africa" iso="12">Algeria</country>
    </countries>' ].

xmlFileHandle := XMLFileSystemFileHandle fileReference: xmlFileReference.

(XMLExternalDocumentConverter convertFileNamed: xmlFileHandle path)

tinchodias commented 2 years ago

And I forgot the say that the cause it that the XMLExternalDocumentConverter uses XMLFileReadStreamFactory which tries to find StandardFileStream

astares commented 1 year ago

@tinchodias where is XMLExternalDocumentConverter from?

astares commented 1 year ago

I introduced a new package "XML-Parser-Tools" using

image

image

astares commented 1 year ago

Fixed for now. Reintroducing colors (if needed) should be handled in #23