Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6607745
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T19:32:09+00:00 2026-05-25T19:32:09+00:00

I have below String i want to parse it !!!! <?xml version=1.0 encoding=ISO-8859-1?> <SOAP-ENV:Envelope

  • 0

I have below String i want to parse it !!!!

<?xml version="1.0" encoding="ISO-8859-1"?>
<SOAP-ENV:Envelope xmlns:SOAP-ENV="http://schemas.xmlsoap.org/soap/envelope/"
    xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
    xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/">
    <SOAP-ENV:Body>
        <ns1:GetDrinksResponse xmlns:ns1="http://schemas.xmlsoap.org/soap/envelope/">
            <return xsi:type="xsd:xml">
                <Details>
                    <id>1</id>
                    <Name>drinks1</Name>
                    <lid>1</lid>
                    <LName><![CDATA[ 151-Proof Rum]]></LName>
                    <lamount><![CDATA[12000]]></lamount>
                    <dmid>1</dmid>
                    <mname><![CDATA[Apple Juice]]></mname>
                    <mamount><![CDATA[2323]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>HighBall Glass</Glass>
                    <Directions>33</Directions>
                    <Condiment>22</Condiment>
                </Details>
                <Details>
                    <id>2</id>
                    <Name>Drnks2</Name>
                    <lid></lid>
                    <LName><![CDATA[ 101-Proof Bourbon]]></LName>
                    <lamount><![CDATA[12000]]></lamount>
                    <dmid>2</dmid>
                    <mname><![CDATA[Apple Juice]]></mname>
                    <mamount><![CDATA[25000]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>Cocktail Glass</Glass>
                    <Directions>ss</Directions>
                    <Condiment>sd</Condiment>
                </Details>
                <Details>
                    <id>3</id>
                    <Name>Gimlet</Name>
                    <lid></lid>
                    <LName><![CDATA[ 151-Proof Rumsssssssss]]></LName>
                    <lamount><![CDATA[1s]]></lamount>
                    <dmid>3</dmid>
                    <mname><![CDATA[Apple Juice]]></mname>
                    <mamount><![CDATA[1]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>Regular</Glass>
                    <Directions>sadasd</Directions>
                    <Condiment>asd</Condiment>
                </Details>
                <Details>
                    <id>4</id>
                    <Name>Drinlks3</Name>
                    <lid></lid>
                    <LName><![CDATA[ 151-Proof Rumsssssssssssss]]></LName>
                    <lamount><![CDATA[12000]]></lamount>
                    <dmid>4</dmid>
                    <mname><![CDATA[Apple Juice]]></mname>
                    <mamount><![CDATA[2323]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>Regular</Glass>
                    <Directions>33</Directions>
                    <Condiment>22</Condiment>
                </Details>
                <Details>
                    <id>5</id>
                    <Name>Dr Abu Julianah</Name>
                    <lid></lid>
                    <LName><![CDATA[ 151-Proof Rum]]></LName>
                    <lamount><![CDATA[sss]]></lamount>
                    <dmid>5</dmid>
                    <mname><![CDATA[Apple Juice]]></mname>
                    <mamount><![CDATA[2323]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>Cocktail Glass</Glass>
                    <Directions>33</Directions>
                    <Condiment>22</Condiment>
                </Details>
                <Details>
                    <id>6</id>
                    <Name>Dr Abu</Name>
                    <lid></lid>
                    <LName><![CDATA[ 151-Proof Rum]]></LName>
                    <lamount><![CDATA[12000]]></lamount>
                    <dmid>6</dmid>
                    <mname><![CDATA[Apple Juicesssssss]]></mname>
                    <mamount><![CDATA[sddddddd]]></mamount>
                    <inid></inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass></Glass>
                    <Directions>33</Directions>
                    <Condiment>22</Condiment>
                </Details>
                <Details>
                    <id>7</id>
                    <Name>Gimlet</Name>
                    <lid></lid>
                    <LName><![CDATA[ 1Testliquers]]></LName>
                    <lamount><![CDATA[12000]]></lamount>
                    <lid></lid>
                    <LName><![CDATA[sdffds]]></LName>
                    <lamount><![CDATA[dsdf]]></lamount>
                    <dmid>7</dmid>
                    <mname><![CDATA[Apple Juiceaaaaaaaaa]]></mname>
                    <mamount><![CDATA[aaaaaaaaaaaaa]]></mamount>
                    <dmid>8</dmid>
                    <mname><![CDATA[7-Up]]></mname>
                    <mamount><![CDATA[2323]]></mamount>
                    <inid>1</inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <inid>2</inid>
                    <inName><![CDATA[]]>
                    </inName>
                    <inamount><![CDATA[]]>
                    </inamount>
                    <Glass>Regular</Glass>
                    <Directions></Directions>
                    <Condiment></Condiment>
                </Details>
            </return>
        </ns1:GetDrinksResponse>
    </SOAP-ENV:Body>
</SOAP-ENV:Envelope>

here is my code and response is above Xml String………..
How to parser in and please give me Handler Class…………….

SAXParserFactory spf = SAXParserFactory.newInstance();
                    SAXParser sp = spf.newSAXParser();


                    XMLReader xr = sp.getXMLReader();

                    ExampleHandler myExampleHandler = new ExampleHandler();
                    xr.setContentHandler(myExampleHandler);

                    xr.parse(new InputSource(response.toString()));

                    ParsedExampleDataSet parsedExampleDataSet = myExampleHandler
                            .getParsedData();

Exception:::

java.io.FileNotFoundException:
    at java.io.FileInputStream.open(Native Method)
    at java.io.FileInputStream.<init>(Unknown Source)
    at java.io.FileInputStream.<init>(Unknown Source)
    at sun.net.www.protocol.file.FileURLConnection.connect(Unknown Source)
    at sun.net.www.protocol.file.FileURLConnection.getInputStream(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLEntityManager.setupCurrentEntity(Unknown Source)
    at com.sun.org.apache.xerces.internal.impl.XMLVersionDetector.determineDocVersion(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XML11Configuration.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.XMLParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.parsers.AbstractSAXParser.parse(Unknown Source)
    at com.sun.org.apache.xerces.internal.jaxp.SAXParserImpl$JAXPSAXParser.parse(Unknown Source)
    at DrinkParser.executeRequest(DrinkParser.java:105)
    at DrinkParser.<init>(DrinkParser.java:64)
    at DrinkParser.main(DrinkParser.java:149)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-25T19:32:10+00:00Added an answer on May 25, 2026 at 7:32 pm

    Yup Problem is solved……………

    factory.setCoalescing(true);
    

    DocumentFactory and CDATA is removed and parsing is as like as Normal XML File…………….

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have below string in javascript var output = '<?xml version=1.0 encoding=UTF-8 standalone=yes?><abc><xyz><xyzResponse><URL>http%3A%2F%2Flocalhost%3A8080%2Fnet%2Fxyz.do%3Fpartner%3Ddummy%26id%3Dba0e245f-ae67-40b6-986d-3242acea4c04</URL><StatusMsg>SUCCESS</StatusMsg><ID>hello.com</ID><AID>test</AID></xyzResponse></xyz></abc>'; I
I have an xml file like down below. I want to get pharmacies nodes'
I have string Tue Nov 12 2010,I want to parse it in java.util.Date object.
I have XML content in a string that defines its encoding in its declaration.
I have the below String assignment statement String items[] = line.split(\,\,15); String fileNamet =
i have an array below string stringArray = new stringArray[12]; stringArray[0] = 0,1; stringArray[1]
I have the code below: string SQL = select * from + TableName; using
I have a string which has the below content String msg = The variables
I have the below methods: public static byte[] ConvertFileToBytes(string filePath) { var fInfo =
Please have a look at the code below: import string from collections import defaultdict

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.