Code Monkey home page Code Monkey logo

Comments (6)

netvl avatar netvl commented on May 31, 2024

It is supposed that error messages should provide proper location information, and there is some infrastructure for that in the parser, but I think it is somewhat broken. I want to rework it one day. Exposing it is probably a good idea, but the proper way to do it also should be thought out properly because of event-based parsing approach.

I'll add it to my to-do list.

from xml-rs.

Blei avatar Blei commented on May 31, 2024

Yes, error messages seem to work as expected. I was more thinking about making this information available to the code that invokes the parser to show in errors caused by program logic not parsing logic, i.e., the parsed xml is syntactically correct but is not what is expected by the program. Findind out which of the thousands of tags in an xml document is formatted incorrectly without having to go through all of them by hand is very useful.

Thanks for looking into this!

from xml-rs.

netvl avatar netvl commented on May 31, 2024

Yes, I understand what you mean. As I said, this positioning code is not exactly correct, so I want to fix it first and then expose it to external consumers.

from xml-rs.

gkoz avatar gkoz commented on May 31, 2024

@netvl
So what's the plan on this? Should an event be carrying its position or should the parser provide the position of the last event?

from xml-rs.

netvl avatar netvl commented on May 31, 2024

@gkoz, I don't have any plans right now. I'm very sorry, but I'm very busy at my main job and I'm also working on my PhD thesis and several articles, all at the same time, so I just physically cannot work on side projects now :(

As a general thought, I don't want to add additional fields to events. Either the parser should provide a method to access the current position or there should be another iterator which returns (Event, Position) where Position: common::HasPosition.

from xml-rs.

Blei avatar Blei commented on May 31, 2024

@gkoz Thanks a lot!

from xml-rs.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.