Code Monkey home page Code Monkey logo

Comments (5)

tadija avatar tadija commented on August 16, 2024

I think that the best solution is just to 'namespace' internal error element in AEXML, so it's called 'AEXMLError' instead of 'error', and this could not happen in that case, do you agree?

from aexml.

Gurpartap avatar Gurpartap commented on August 16, 2024

AEXMLError sounds better alternative for errors pertaining to parsing or writing XML. But that's a different issue.

I think AEXML should not be bothered to check for <error> in the XML. Let the end-developer think about what goes in the XML content.

from aexml.

Gurpartap avatar Gurpartap commented on August 16, 2024

I now see how AEXMLError is related to this issue and hard to separate since at the moment AEXML returns any error in the form of AEXMLElement("error", ..).

from aexml.

Gurpartap avatar Gurpartap commented on August 16, 2024

For the time being, I'm using:

if xmlDoc.root["error"].name == "error" && xmlDoc.root["error"].stringValue != "element <error> not found" {
    ...
}

from aexml.

tadija avatar tadija commented on August 16, 2024

Hi, this is fixed.

Now you have errorElementName class property on AEXMLElement,
so you can check against it if some element doesn't exist, and parse element like any other.

Thanks for the feedback,
// T

from aexml.

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.