Creating Well-Formed XML Question

I need to create an xml document in a specific format. I've created a test case using the scott/tiger schema. Here's what I need:
<ALL_DEPARTMENTS>
<DEPEARTMENT>ACCOUNTING
<LOCATION>NEW YORK</LOCATION>
<NAME>CLARK
<JOB>MANAGER</JOB>
<HIREDATE>06/09/1981</HIREDATE>
</NAME>
</DEPARTMENT>
(repeat until all names exhausted for that department)
<DEPARTMENT>RESEARCH
(repeat until all departments and employees are exhausted)
</ALL_DEPARTMENTS>
Here's the script as I've created it:
set serveroutput on
declare
cursor myDept is
select deptno from scott.dept;
eachDept myDept%ROWTYPE;
cursor myEmp is
select * from scott.emp where
deptNo = eachDept.deptNo;
eachEmp myEmp%ROWTYPE;
targetDoc dbms_xmldom.domdocument;
root dbms_xmldom.domelement;
sourceDoc dbms_xmldom.domdocument;
elem dbms_xmldom.domelement;
firstTarget XMLType := xmlType('<ALL_DEPARTMENTS/>');
firstXML XMLType;
secondXML XMLType;
begin
targetDoc := dbms_xmldom.newDomDocument(firstTarget);
root := dbms_xmldom.getDocumentElement(targetDoc);
open myDept;
loop
fetch myDept into eachDept;
Exit when myDept%NOTFOUND;
select
xmlelement("DEPARTMENT",dname,
xmlelement("LOCATION",loc)) into firstXML from scott.dept
where deptno = eachDept.deptNo;
sourceDoc := dbms_xmldom.newdomdocument(firstXML);
elem := dbms_xmldom.getDocumentElement(sourceDoc);
elem := dbms_xmldom.makeElement(dbms_xmldom.importnode(targetDoc,dbms_xmlDom.makeNode(elem),true));
elem := dbms_xmldom.makeElement(dbms_xmldom.appendChild(dbms_xmldom.makeNode(root),DBMS_xmldom.makeNode(elem)));
Open myEmp;
Loop
fetch myEmp into eachEmp;
Exit when myEmp%NOTFOUND;
select xmlelement("NAME",ename,
xmlelement("JOB",job),
xmlelement("HIREDATE",to_char(hiredate,'MM/DD/YYYY')))
into secondXML
from
scott.emp
where
empNo = eachEmp.empNo;
sourceDoc := dbms_xmldom.newdomdocument(secondXML);
elem := dbms_xmldom.getdocumentelement(sourceDoc);
elem := dbms_xmldom.makeelement(dbms_xmldom.importnode(targetDoc, dbms_xmldom.makenode(elem),true));
elem := dbms_xmldom.makeElement(dbms_xmldom.appendchild(dbms_xmldom.makeNode(root), dbms_xmldom.makenode(elem)));
end loop;
close myEmp;
end loop;
close myDept;
dbms_output.put_line('XML = '||FirstTarget.getClobVal());
end;
The output is:
<ALL_DEPARTMENTS>
<DEPARTMENT>ACCOUNTING
<LOCATION>NEW YORK</LOCATION>
</DEPARTMENT>
<NAME>CLARK
<JOB>MANAGER</JOB>
<HIREDATE>06/09/1981</HIREDATE>
</NAME>
<NAME>KING
<JOB>PRESIDENT</JOB>
<HIREDATE>11/17/1981</HIREDATE>
</NAME>
<NAME>MILLER
<JOB>CLERK</JOB>
<HIREDATE>01/23/1982</HIREDATE>
</NAME>
<DEPARTMENT>RESEARCH
<LOCATION>DALLAS</LOCATION>
</DEPARTMENT>
<NAME>SMITH
<JOB>CLERK</JOB>
<HIREDATE>12/17/1980</HIREDATE>
</NAME>
<NAME>JONES
<JOB>MANAGER</JOB>
<HIREDATE>04/02/1981</HIREDATE>
</NAME>
<NAME>SCOTT
<JOB>ANALYST</JOB>
<HIREDATE>12/09/1982</HIREDATE>
</NAME>
<NAME>ADAMS
<JOB>CLERK</JOB>
<HIREDATE>01/12/1983</HIREDATE>
</NAME>
<NAME>FORD
<JOB>ANALYST</JOB>
<HIREDATE>12/03/1981</HIREDATE>
</NAME>
<DEPARTMENT>SALES
<LOCATION>CHICAGO</LOCATION>
</DEPARTMENT>
<NAME>ALLEN
<JOB>SALESMAN</JOB>
<HIREDATE>02/20/1981</HIREDATE>
</NAME>
<NAME>WARD
<JOB>SALESMAN</JOB>
<HIREDATE>02/22/1981</HIREDATE>
</NAME>
<NAME>MARTIN
<JOB>SALESMAN</JOB>
<HIREDATE>09/28/1981</HIREDATE>
</NAME>
<NAME>BLAKE
<JOB>MANAGER</JOB>
<HIREDATE>05/01/1981</HIREDATE>
</NAME>
<NAME>TURNER
<JOB>SALESMAN</JOB>
<HIREDATE>09/08/1981</HIREDATE>
</NAME>
<NAME>JAMES
<JOB>CLERK</JOB>
<HIREDATE>12/03/1981</HIREDATE>
</NAME>
<DEPARTMENT>OPERATIONS
<LOCATION>BOSTON</LOCATION>
</DEPARTMENT>
</ALL_DEPARTMENTS>
How can I get the closing </DEPARTMENT> to fall after all the names associated with that department? I'm sure it's something simple, but I'm just not seeing it.

Does this make sense to anyone?
<DEPARTMENT>ACCOUNTING
<LOCATION>NEW YORK</LOCATION>
</DEPARTMENT>
<NAME>CLARK
<JOB>MANAGER</JOB>
<HIREDATE>06/09/1981</HIREDATE>
</NAME>
<NAME>KING
<JOB>PRESIDENT</JOB>
<HIREDATE>11/17/1981</HIREDATE>
</NAME>
So, you have <NAME>KING but the closing tag is two lines down. I am not sure if that is legal. To get the job and hiredate also, this is what I had to do,
select xmlelement("AllDepartments",
     xmlagg(xmlelement("Department",
          xmlattributes(d.dname as "DeptName", d.loc as "Location"),
          (select xmlagg(xmlelement("ENames",
               xmlforest(e.ename as "Ename", e.job as "Job", e.hiredate as "Hiredate")))
               from emp e
               where e.deptno = d.deptno     
)).extract('/*') as deptxml
from dept d
and the result is
<AllDepartments>
<Department DeptName="ACCOUNTING" Location="NEW YORK">
<ENames>
<Ename>CLARK</Ename>
<Job>MANAGER</Job>
<Hiredate>1981-06-09</Hiredate>
</ENames>
<ENames>
<Ename>KING</Ename>
<Job>PRESIDENT</Job>
<Hiredate>1981-11-17</Hiredate>
</ENames>
<ENames>
<Ename>MILLER</Ename>
<Job>CLERK</Job>
<Hiredate>1982-01-23</Hiredate>
</ENames>
</Department>
<Department DeptName="RESEARCH" Location="DALLAS">
<ENames>
<Ename>SMITH</Ename>
<Job>CLERK</Job>
<Hiredate>1980-12-17</Hiredate>
</ENames>
<ENames>
<Ename>JONES</Ename>
<Job>MANAGER</Job>
<Hiredate>1981-04-02</Hiredate>
</ENames>
<ENames>
<Ename>SCOTT</Ename>
<Job>ANALYST</Job>
<Hiredate>1987-04-19</Hiredate>
</ENames>
<ENames>
<Ename>ADAMS</Ename>
<Job>CLERK</Job>
<Hiredate>1987-05-23</Hiredate>
</ENames>
<ENames>
<Ename>FORD</Ename>
<Job>ANALYST</Job>
<Hiredate>1981-12-03</Hiredate>
</ENames>
</Department>
<Department DeptName="SALES" Location="CHICAGO">
<ENames>
<Ename>ALLEN</Ename>
<Job>SALESMAN</Job>
<Hiredate>1981-02-20</Hiredate>
</ENames>
<ENames>
<Ename>WARD</Ename>
<Job>SALESMAN</Job>
<Hiredate>1981-02-22</Hiredate>
</ENames>
<ENames>
<Ename>MARTIN</Ename>
<Job>SALESMAN</Job>
<Hiredate>1981-09-28</Hiredate>
</ENames>
<ENames>
<Ename>BLAKE</Ename>
<Job>MANAGER</Job>
<Hiredate>1981-05-01</Hiredate>
</ENames>
<ENames>
<Ename>TURNER</Ename>
<Job>SALESMAN</Job>
<Hiredate>1981-09-08</Hiredate>
</ENames>
<ENames>
<Ename>JAMES</Ename>
<Job>CLERK</Job>
<Hiredate>1981-12-03</Hiredate>
</ENames>
</Department>
<Department DeptName="OPERATIONS" Location="BOSTON"/>
</AllDepartments>
Quite different from what you wanted.
Ben

Similar Messages

  • Generate Query in PLSQL to return Well Formed XML with Multiple records

    Hi there
    This is very urgent. I am trying to create a PLSQL query that should retrieve all records from oracle database table "tbl_Emp" in a well formed xml format. The format is given below
    *<Employees xmlns="http://App.Schemas.Employees" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *<Employee>*
    *<First_Name></First_Name>*
    *<Last_Name></Last_Name>*
    *</Employee>*
    *</Employees>*
    To retrieve data in above format, I have been trying to create a query for long time as below
    SELECT XMLElement("Employees",
    XMLAttributes('http://App.Schemas.Employees' AS "xmlns",
    *'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"),*
    XMLElement("Employee", XMLForest(First_Name, Last_Name)))
    AS "RESULT"
    FROM tbl_Emp;
    But it does not give me the required output. It creates <Employees> tag with each individual record which I don't need. I need <Employees> tag to be the root tag and <Employee> tag to repeat and wrap each individual record. Please help me in this as this is very urgent. Thanks.

    Hi,
    Please remember that nothing is "urgent" here, and repeating that it is will likely produce the opposite effect.
    If you need a quick answer, provide all necessary details in the first place :
    - db version
    - test case with sample data and DDL
    That being said, this one's easy, you have to aggregate using XMLAgg :
    SELECT XMLElement("Employees"
           , XMLAttributes(
               'http://App.Schemas.Employees' AS "xmlns"
             , 'http://www.w3.org/2001/XMLSchema-instance' AS "xmlns:xsi"
           , XMLAgg(
               XMLElement("Employee"
               , XMLForest(
                   e.first_name as "First_Name"
                 , e.last_name  as "Last_Name"
           ) AS "RESULT"
    FROM hr.employees e
    ;

  • How to make an XML in form of String to well-formed XML document

    Hi Folks,
         Thanks for all you support in Advance, i have a requirement, where i have an XML in one line string form and i wondering how to convert into well formed XML?
    Input XML sample:
    <root> <one><link1></link1></one><two></two> </root>
    to well-formed XML
    <root>
          <one>
              <link1></link1>
         </one>
         <two>
         </two>
    </root>
    I was trying to create a well-formed document using DOM or SAX parsers in ExcuteScript activity, but it is leading to some complicated exceptions. And i am looking for the simplest way for transformation.
    Please let me know
    thanks,
    Rajesh

    Rajesh,
    I don't understand. There is no difference between the two XML instances other than whitespace. They are both well-formed XML.
    <root> <one><link1></link1></one><two></two> </root>
    <root>
          <one>
              <link1></link1>
         </one>
         <two>
         </two>
    </root>
    Steve

  • Javascript request on non well-formed xml file in Safari

    Hi,
    I make an AJAX request to get a non well-formed xml file. On Internet Explorer (domNode is empty) and Firefox (domNode is not empty but a tag "parsererror" is present), I can know if the document is non well-formed but on Safari the request seems to be ok, I get a part of the non well-formed file (until the error).
    I would like to say if I can make the difference between a well-formed xml file and a non well-formed xml file (with an AJAX request) on Safari.
    Thanks
    Julien

    I have built a desktop application that can use these
    calls to check if the xml contained in the document
    called "file" is well formed.
    Ok. So, the application works fine then?
    DocumentBuilderFactory domFactory =
    DocumentBuilderFactory.newInstance();
    DocumentBuilder domBuilder =
    lder domBuilder = domFactory.newDocumentBuilder();
         domBuilder.parse(file);
    They are part of the javax.xml.parsers.*; package.
    Problem is that to serve this I need to put it in an
    applet but since I have to write the xml string to a
    file local to the server the applet is not working.
    Huh? You lost me there. Are you getting security exceptions from the applet? If yes, you need to sign the applet. Otherwise, what is not 'working' in the applet compared to the application? Also, why do you need to first write it to a file?
    My question is if anyone knows of some classes in the
    API that will allow me to check if a String of XML is
    well formed or not.
    If the document is not well-formed, the parse() call will throw an exception. Catch this and process as needed.
    I basically need to get a string from a field in a
    data base in XML format and be able to test it
    without first writing it to a document so I can get
    the applet to work.
    If you want to access an external database from an applet, you will need to sign the applet. You should not need to first write it to a file before parsing. Rather, simply use a stream (either InputStream or Reader) and wrap it in a StreamSource object.
    If anyone knows something on this or has an
    alternative suggestion please do tell.
    Thanks.- Saish

  • This seems to be well formed XML. Why?

    Hello,
    I can't find an answer to the question why this xml seems to be "well formed". (According to: http://www.xml.com/pub/a/tools/ruwf/check.html.)
    <?xml version="1.0" encoding="UTF-8"?>
    <example>
        <myelement category="<MyCategory>">MyContent</myelement>
    </example>Watch out for the > in the "category" attribute value.
    As far as I know this is not valid XML. But the validator I used says its OK. I used JDOM to parse this data and it works without any error. Why?
    Thanks for your time.
    Peer

    I can't find an answer to the question why this xml seems to be "well formed". Because it obeys all the syntactic conventions of well formed xml?That's obviously the only correct answer to my question. :-)
    But you have to admit that it's a little bit strange to escape the left angle bracket and not the other one. I cannot see the benefit of it. But probably there is none....
    Thanks again, Pete!
    Peer

  • Got "Reponse is not well-formed XML" error when calling FormDataIntegration web service

    Hi,
    I'm using Windows Server 2008 + LiveCycle Server ES2 (Reader Extensions) + ASP.NET
    This problem only happened when I run the ASP.NET program with the licensed version of the server, (which i installed form the CD provided)
    However, there is no problem in my development environment with the trial version downloaded from Adobe website, the import data was successful and a correct PDF form can be returned.
    My question is that whether there is a problem within the LiveCycle services? or there is missing component that needs to be installed?? Thanks
    After call the importData of FormDataIntegration, I got below error
    Response is not well-formed XML.
    System.InvalidOperationException: Response is not well-formed XML. ---> System.Xml.XmlException: Root element is missing.
    at System.Xml.XmlTextReaderImpl.Throw(Exception e)
    at System.Xml.XmlTextReaderImpl.ThrowWithoutLineInfo(String res)
    at System.Xml.XmlTextReaderImpl.ParseDocumentContent()
    at System.Xml.XmlTextReaderImpl.Read()
    at System.Xml.XmlTextReader.Read()
    at System.Xml.XmlReader.MoveToContent()
    at System.Web.Services.Protocols.SoapHttpClientProtocol.ReadResponse(SoapClientMessage message, WebResponse response, Stream responseStream, Boolean asyncCall)
    at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters)
    --- End of inner exception stack trace ---
    I checked in LiveCycle's jboss log, I found below errors:
    2011-02-17 14:16:37,086 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.ArraySerializer.serialize(ArraySerializer.j ava:76)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:707)
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:281)
    at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,087 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.io.IOException: java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:326)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    : at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,088 ERROR [org.apache.axis.SOAPPart] Exception:
    java.io.IOException: java.io.IOException: java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.AdobeAxisBeanSerializer.serialize(AdobeAxis BeanSerializer.java:326)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at java.lang.Thread.run(Thread.java:619)
    2011-02-17 14:16:37,088 WARN  [org.apache.axis.attachments.AttachmentsImpl] Exception:
    AxisFault
    faultCode: {http://schemas.xmlsoap.org/soap/envelope/}Server.userException
    faultSubcode:
    faultString: ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
    faultActor:
    faultNode:
    faultDetail:
    {http://xml.apache.org/axis/}hostname: XXXX
    ALC-DSC-003-000: com.adobe.idp.dsc.DSCInvocationException: Invocation error.
    at org.apache.axis.AxisFault.makeFault(AxisFault.java:101)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:333)
    at org.apache.axis.strategies.InvocationStrategy.visit(InvocationStrategy.java:32)
    at org.apache.axis.providers.java.RPCProvider.processMessage(RPCProvider.java:186)
    at org.apache.axis.providers.java.JavaProvider.invoke(JavaProvider.java:323)
    ... 33 more
    Caused by: java.lang.NoClassDefFoundError: com/adobe/formServer/utils/LogUtils
    at com.adobe.formServer.utils.CommonGibsonUtils.PDFDocumentFromDocument(CommonGibsonUtils.ja va:122)
    at com.adobe.livecycle.formdataintegration.server.FormData.importData(FormData.java:64)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at com.adobe.idp.dsc.component.impl.DefaultPOJOInvokerImpl.invoke(DefaultPOJOInvokerImpl.jav a:118)
    ... 74 more
    2011-02-17 14:16:37,090 ERROR [org.apache.axis.encoding.ser.BeanSerializer] Exception:
    java.lang.NullPointerException
    at com.adobe.idp.dsc.provider.impl.soap.axis.ser.ArraySerializer.serialize(ArraySerializer.j ava:76)
    at org.apache.axis.encoding.SerializationContext.serializeActual(SerializationContext.java:1 504)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:980)
    at org.apache.axis.encoding.SerializationContext.serialize(SerializationContext.java:707)

    it's base64, here's the codes i called, any hints?
                FormDataIntegration.FormDataIntegrationService dataIntClient = new FormDataIntegration.FormDataIntegrationService();
                dataIntClient.Url += "?blob=base64";
                dataIntClient.Credentials = new System.Net.NetworkCredential(account, password);
                FormDataIntegration.BLOB inXMLData = new FormDataIntegration.BLOB();
                inXMLData.binaryData = xmlData;
                FormDataIntegration.BLOB inPDFForm = new FormDataIntegration.BLOB();
                string pathPDF = Path.Combine(AppDomain.CurrentDomain.BaseDirectory, "bin\\ReplySlipByEmail.pdf");
                FileStream fsPDF = new FileStream(pathPDF, FileMode.Open);
                int lenPDF = (int)fsPDF.Length;
                byte[] bytePDF = new byte[lenPDF];
                fsPDF.Read(bytePDF, 0, lenPDF);
                inPDFForm.binaryData = bytePDF;
                FormDataIntegration.BLOB result = dataIntClient.importData(inPDFForm, inXMLData);
                return ApplyUsageRightsToPDF(result.binaryData, account, password, LCCertName);

  • Not well-formed XML

    Hi guys,
    I need to parse an XML file which is not well formed.
    For example, the value of an element named 'topic' contains html tags which are not ended properly etc..
    e.g. <topic>Some text <BR></topic>
    Why do I need this? Because some idiots on their web site publish XML data (not well formed) which indeed is very valuable to me, and I want to use it. I tried contacting them on the "not-well-formed-XML" issue but haven't managed to get a reply yet. Hence I have been struggling with this using the SAX API and so on...
    I think there should be a way to ignore some elements' content when parsing the XML data but I haven't been able to do it...I am not experienced on SAX or DOM API's...
    For example if the problem is caused only by the BR tags then when I encounter it, either startTag or endTag, I should be able to ignore it. When I say "ignore", I mean "not change the state of the parser", or undo the last state change or whatever...Well at least I think I would write an XML parser like this if I were to do that...
    Any help is appreciated...

    Sorry to be the bearer of bad news.
    There is no such thing as an "XML file which is not
    well formed." There are files that look like they
    might be XML files but are not valid. I think that is
    what you have. One of the key differences between XML
    and HTML is that HTML has allowed sloppy habits to
    become routine. XML prohibits them from getting past
    the hurdle of validation.
    Dave PattersonI'm not sure about the comments that you have made about the validity and well-formedness about XML documents. As I said I'm not experienced in XML but as far as I understand, a document is called "valid" when it conforms to all the constraints imposed by a DTD. However, there is no DTD in my case and the XML document I have is not "well-formed" as defined below:
    A well-formed XML document is syntactically correct. It does not have any angle brackets that are not part of tags. (The entity references < and > are used to embed angle brackets in an XML document.) In addition, all tags have an ending tag or are themselves self-ending (<slide>..</slide> or <slide/>). In addition, in a well-formed document, all tags are fully nested. They never overlap, so this arrangement would produce an error: <slide><image>..</slide></image>. Knowing that a document is well formed makes it possible to process it. A well-formed document may not be valid however. To determine that, you need a validating parser and a DTD.
    According to the above definition the XML document I have violates the constraints and not well formed. But you can argue that the XML document I got is not an XML document but it is just some document :) Then anyway, I am not sure about all this terminology...
    The technique you suggested seems reasonable but as far as I know the SAX parser stops parsing when a fatal error is encountered. So I don't know how I will trap/ignore the error and continue...
    As for the JTidy suggestion:
    I have tried using HttpUnit which uses JTidy and couldn't get it right. I think when a DOM is created using JTidy the document must also be well formed (XHTML or whatever)...Am I wrong here?
    Thanks a lot...

  • How to ensure a Java App writes well-formed XML

    I have created an event logger utility which creates an XML log of an application's activity. At the moment, it manually writes the XML as text strings, with manual encoding of &, <, > symbols.
    Occasionally the text written to the XML is not considered well-formed in Internet Explorer because it contains characters with accents.
    Is there any way using SAX or DOM that I could build and write to the log file in real time, and ensure that it is well-formed?
    Thanks in advance for your time...

    The short answer is yes, if you use a package that supports SAX or DOM, it should produce well-formed XML, provided you can figure out how to make it write an XML file.
    The long answer, however, is that once you have written an XML file, you can't just tack data onto the end of it, because doing so makes it malformed. The new data has to be tacked on inside the root element, and that means you have to read the XML into a DOM, append the new data as the last child element, and write the XML out again. Perhaps you could keep your log in a DOM in memory, adding log elements as required, and periodically write it to an XML file. This wouldn't work for a large volume of logs, because it would expand to fill your memory, but it would be okay for a small volume.

  • 0x8004005 / Error: Configuration file is not well-formed XML

    Hello,
    I am getting a complete headache from this! I uninstalled Visual Studio 2013 Ultimate and installed in on another hard drive. Since then nothing works! It seems to be an error with IIS...
    The following happens:
    When I want to create ASP.NET Empty Web Application:
    When I ceate an ASP.NET MVC 4 Web Application
    When I open an existing project:
    similar to first screenshot, can only upload 2 images...
    I already tried the following:
    Reinstalling Visual Studio Ultimate 2013 
    Reinstalling IIS Express 8
    Thanks!

    Hi,
    In order to resolve your problem. You should give us some information:
    First, is there any error occur when you install the VS or do you can successfully install the VS? You can use
    http://aka.ms/vscollect to gather the latest installation logs. After using it, you will find vslogs.cab from %temp% folder. Please upload the file to
    https://Onedrive.live.com/ and share the link here.
    Second, the error may related to .NET FrameWork. You can use the tool in the link to check the .NET Framework Setup:
    http://blogs.msdn.com/b/astebner/archive/2008/10/13/8999004.aspx
    If there are something wrong, you should repair the .NET framework.
    At last, there is a blog related to the error, you can follow up to handle your issue:
    http://blogs.msdn.com/b/acoat/archive/2013/04/23/iisexpress-configuration-file-is-not-well-formed-xml.aspx
    Best Wishes!
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place. <br/> Click <a
    href="http://support.microsoft.com/common/survey.aspx?showpage=1&scid=sw%3Ben%3B3559&theme=tech"> HERE</a> to participate the survey.

  • DI Webservice - Response not well-formed XML & OBServer.dll failed extract

    Hi,
    My company just implement SAP B1 this year.
    So far, we encounter 2 issue :
       1. Every month we encounter "Response is not well-formed XML" using DI Server Webservice.
       2. Failed to extract OBServer.dll from CAB file (encounter also once a month)
    For issue 1, restart DI Server service will not help.
    I need to reboot the Windows OS to make it work again.
    For issue 2, restart DI Server service will help to solve the problem.
    But the question why this happening ?
    Please help.
    Thanks.

    Hi,
    To begin troubleshooting, you may check any monthly applications' running like update or anti-virus.
    Thanks,
    Gordon

  • Biztalk Schema generator in Visual Studio - How to enable 'Well-Formed XML' ?

    Hello!
    I have installed Visual Studio 2010 and Biztalk on Windows 7. I create a new Biztalk-project in Visual STudio 2010. I choose 'Add new item' and then 'New generated schema'. Here I can choose 'Document
    type'. I choose 'Well-Formed XML (Not loaded)' and choose an input file.
    Now I get the message 'XFW to XSD schema generation module is not installed. Execute 'C:\Program files (X86)\Microsoft Biztalk Server 2010\SDK\Utilities\Schema Generator\InstallWFX.vbs to install the
    WFX to XSD schema generation module.'
    I try to execute that file and some text hastily appear on the console. I restart Visual Studio 2010, but it still doesn't work. Apparently the execution of the shell script didn't work. I try to restart
    the computer, but it still doesn't work.
    Could anyone tell me what to do?
    Thanks!
    Anders Branderud 

    Hi Steef-Jan!
    Thank you!
    Running it as administrator solved the problem.
    Anders
    Branderud 

  • Not well formed  XML data in XI

    HELLO !!
    Can XI handle a non welll formed XMl messages as an input  ?
    THANKS
    ~Peeru

    Hey
    >>we can use java mapping to make it well formed XMl.
    What exactly you mean by "not well formed XML" ?
    >>Does it mean that java mapping can take the value as a stream of data and then at the next step the XML parser is va;idating the msg ?
    Yeah thats the way Java mapping works,it takes input in the form of Input stream and gives output as an output stream.
    Bottom line is XML structure should be valid,you can't handle a invalid XML structure with any mapping,once you get the message  then you can use graphical message mapping for simple structures or use Java for complex ones(i guess by non-well formed you mean the ones which can be handled only by Java mapping)
    Thanx
    Aamir

  • How to format a not well formed xml into well formed

    Hi,
    Here's what I'm trying to do: I have a build a report based on query results. In the query result, one field is a CLOB (which contains XML. The XML contains two tags - "description" and "count"). I want to read (&parse) the XML and store the "description" and "count" in a hashmap. But when I try to parse it, I end up in an error. I'm currently  using XmlParse but I got an error "The markup following the root element should be well formed."  I immediately used IsXml() to find out if the XML I am reading is well formed.  And the answer is "NO".
    Could someone help me in converting it into a "well formed" one?
    (This is what I've tried: I appended "<?xml version="1.0" encoding="UTF-8"?>" to the XML I'm reading coz it was missing this.  I later used XmlFormat to convert the XML into a string format.  But IsXML tells me that even this is not well formed.)
    Thanks much for your help!

    XML encodes information is a specific way. Well-formedness determines whether or not a string is an XML document in the first place.
    However, as well-formedness can be broken by any arbitrary number of factors, it is in general impossible to automate the repair process to recover a well-formed XML document. You have to do it manually, using an XML or a text editor.

  • XML Custom Panels: Samples With Doc are Not Well Formed XML

    The custom panel samples in the XMP Custom Panels document (and the accompanying sample file) is not well formed XML (which means that CS3 can't be parsing the file as XML, which would explain how this error made it publication). In particular, the XML declaration is missing the closing "?".
    <br />
    <br />As published it is:
    <br />
    <br /><?xml version="1.0"?>
    <br />
    <br />It should be:
    <br />
    <br /><?xml version="1.0"?>
    <br />
    <br />Note the "?&gt;" rather than "&gt;".
    <br />
    <br />This is in addition to the DOCTYPE SYSTEM URL not resolving to an actual DTD declaration set (which would be:
    <br />
    <br />
    <br /> title CDATA #REQUIRED
    <br /> type NMTOKEN #REQUIRED
    <br />&gt;
    <br />
    <br />Cheers,
    <br />
    <br />Eliot

    You'll have to do something to prevent your logger from appending to old logs that have been closed. Sorry if that is not very helpful, but I'm not familiar with the logging features in SDK 1.4. For your interest, though, Log4J (which you can get from Apache) also features XML logging, and it solved that rather obvious problem thus:
    "The output of the XMLLayout consists of a series of log4j:event elements as defined in the log4j.dtd. It does not output a complete well-formed XML file. The output is designed to be included as an external entity in a separate file to form a correct XML file."
    In other words, you would have to wrap the output in an XML header and a root node to be able to use it, which is not difficult to do.

  • Assembler Service API Quick Starts Web service API, Response is not well-formed XML

    Hi,
    I am trying to get the "Assembler Service API Quick Start" webservice api example to work in a asp.net application.
    The following line produces the exception below.
    // Send the request to the Assembler Service
    AssemblerResult result = asOb.invoke( ddxDoc, inputMap, assemblerSpec );
    "Response is not well-formed XML. at System.Web.Services.Protocols.SoapHttpClientProtocol.Invoke(String methodName, Object[] parameters) at AssemblerServiceService.AssemblerServiceService.invoke(BLOB inDDXDoc, mapItem[] inputs, AssemblerOptionSpec environment)"
    Any help would be greatly appreciated.
    Thanks
    cheeves
    (the code is exactly as it is in the example, except for adding "?blob=base64" to the url of the AssemblerServiceService obeject, and I have the 3 files in the root of my c drive)

    after looking at the example more closely I discovered that there is a key name called "optionsLink.pdf" that doesn't match the source in the DDX file.

Maybe you are looking for

  • Can i redownload an app i bought on another computer?

    I wanna buy Logic Pro on the app store but i might get a new faster Mac soon and i just wanna know before i get it if i can download it on both computers or just wait to get the new one and download it then.

  • Very Poor Quality when burning to regular DVD

    Can somebody tell me why when i burn to regular dvd the quality looks like a vhs video which is out of focus ?  When i burn to blu ray its crystal clear !!  I dont expect great great quality but i would expect something that is watchable !!

  • FCP to AVID

    I know theres software i can purchase which supposably will transfer an fcp timeline to avid, but i just dont want to deal with xml mle confusion, its just not worth it. Basically i have to export a video for an avid system to add graphics, and then

  • How to set the Default Album Art in the Artist Grid?

    This option was lost when upgrading to iTunes 11, how do I do it? A lot of my artists have blank Grid art (even though every album I own has artwork).

  • SQL developer hide non printable characters

    Hi I have accidentally turned on non printiable characters in sql developer.Does anybody know how to turn this off