Giter Club home page Giter Club logo

pojoxml's People

pojoxml's Issues

getPojo(String xmlInput,Class clas) expect FileName instead of XMLinput string

What steps will reproduce the problem?
1. getPojo(String "< XML content >",Class clas) will fail to open xmlInput file 
2.
3.

What is the expected output? What do you see instead?
getPojo should read XML string instead of opening file

What version of the product are you using? On what operating system?
latest

Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 6 Jan 2012 at 8:50

Bug in parsin Strings directly

Method "public Object getPojo(String xmlContent, Class objectClass)" is not 
working.
It handles the xmlContent as filename.

Here my changes:

    public Object getPojo(String xmlContent, Class objectClass) {
        XmlToPojo xmlToPojo = new XmlToPojo(objectClass);
        return xmlToPojo.parseXMLFromXmlData(xmlContent, pojoXmlInitInfo);
    }

The call of the parser in class XmlToPojo has to be a little different:
document = docBuilder.parse(new InputSource(new 
ByteArrayInputStream(xmlData.getBytes("utf-8"))));

Maybe you should add some unit-tests for the "String-Case", not only for the 
"File-Case".

Nice tool.

Regards,

Thorsten

Original issue reported on code.google.com by [email protected] on 26 Mar 2014 at 12:18

Does not work with blob

What steps will reproduce the problem?
1. Pojo with blob
2. Output xml contains </blob>
3.

What is the expected output? What do you see instead?


What version of the product are you using? On what operating system?


Please provide any additional information below.


Original issue reported on code.google.com by [email protected] on 21 Sep 2012 at 4:02

getPojo fails with raw xml data

What steps will reproduce the problem?
1. Call getPojo(xmldata, MyPOJO.class)
2.
3.

What is the expected output? 
parse the xmlstring and create pojo object

What do you see instead?
FileNotFoundException as it try to locate input xml string as filename !

What version of the product are you using? On what operating system?
pojoxml-1.0

Please provide any additional information below.

At PojoXmlImpl.getPojo()
we should call xmlToPojo.parseXMLFromXmlData instead of 
xmlToPojo.parseXMLFromFile

And in XmlToPojo

document = docBuilder.parse(xmlData);

Instead above line, should replace with below lines

InputSource inputSource = new InputSource( new StringReader( xmlData ) );
            document = docBuilder.parse(inputSource);

Original issue reported on code.google.com by [email protected] on 5 Jan 2014 at 7:59

Attachments:

Problem with creating xml with < > chars

What steps will reproduce the problem?
1. create String with "<>" inside
2. create XML from pojo
3. result xml contains <> instead of &lt&gt

What is the expected output? What do you see instead?
see 3.

What version of the product are you using? On what operating system?
1.0

Please provide any additional information below.
afaik these should be replaced, its not valid then

Original issue reported on code.google.com by [email protected] on 29 Feb 2012 at 11:38

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.