Only one top level element is allowed in an XML document. Line 2, Position 2
I get this error when I try to run an xsql query with a where clause:
Only one top level element is allowed in an XML document. Line 2, Position 2
<font size='-1' face='monospace'>XSQL-005: XSQL page is not well-formed.</font><BR>
-^
Here is the xsql query I tried to use.
<?xml version="1.0"?>
<xsql:query connection="xmlbook" xmlns:xsql="urn:oracle-xsql">
select * from companytable where companynumber < 1000;
</xsql:query>
null
You need to escape certain characters in order to make XML documents well formed. The problem in this case is the less than sign between companynumber and 1000. You should replace it with <
I recommend reading a good XML book - "Building Oracle XML Applications" by Steve Muench, for instance.
Brian
Similar Messages
-
Only one top level element is allowed in an XML document. Error message
Hi all, Am receiving above message when trying to view XML data generation. Have found little to no documentation on this particular message and thus far unable to research/guess my way to resolition. Any and all help will greatly appreciated. Thanks in advance for the help, harold
I had been using MC Internet Explorer until this . Have compared this one to functioning XML viewable with MS Internet explorer. Below is code I am using trying to resolve this problem.
<?xml version="1.0"?>
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="ecrtas"/>
<tt:template>
<tt:loop ref="ecrtas">
<ImportInstructions>
<ProjectSponsorInstruction>
<Instruction mode="Add">
<SponsorName tt:value-ref="SPONME"/>
<SponsorNumber>
<IdValue name="Sponsor Number"><tt:value ref="SPONSOR"/></IdValue>
</SponsorNumber>
<SponsorType tt:value-ref="SPONTYP"/>
</Instruction>
</ProjectSponsorInstruction>
</ImportInstructions>
</tt:loop>
</tt:template>
</tt:transform>
Thank you again -
I have to print two labels using single XML file.Error:Only one top level e
Hi,
I have to print two labels using single XML file. But its giving error:
[Error] Error -1072896683 - Line: 38 Pos: 2 Error: Only one top level element is allowed in an XML document.
Below is my XMl file:
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE labels SYSTEM "label.dtd">
<labels FORMAT="lib://FRD/PurchasedDoor.btw" PRINTERNAME="IBM 6700-R80 (300 dpi)" _QUANTITY="1">
<label>
<variable name= "Color">AUTUMN</variable>
<variable name= "Special_Message_Attribute">MSG*</variable>
<variable name= "Special_Message">This is special Message Label</variable>
<variable name= "Model"></variable>
<variable name= "Build_Date">09-APR-12</variable>
<variable name= "Assy_Cart"></variable>
<variable name= "Assy_Slot"></variable>
<variable name= "Finish_Cart"></variable>
<variable name= "Finish_Slot"></variable>
<variable name= "Serial_Number">1945.1.1.2-1</variable>
<variable name= "Serial_Number_Barcode">1945.1.1.2-1</variable>
<variable name= "Specie">BIRCH</variable>
<variable name= "Truck_Group"></variable>
<variable name= "Label_Sequence_No">1</variable>
<variable name= "WIP_Cart"></variable>
<variable name= "WIP_Slot"></variable>
<variable name= "Cabinet_Sequence_No">110</variable>
<variable name= "JC"></variable>
<variable name= "Thickness"> </variable>
<variable name= "Width"> </variable>
<variable name= "Length"> </variable>
<variable name= "Overlay"></variable>
<variable name= "Options">B30</variable>
<variable name= "Profile_No"></variable>
<variable name= "Door_Style">NEWBERRY</variable>
<variable name= "Glaze"></variable>
<variable name= "Shape"></variable>
<variable name= "Glass"></variable>
<variable name= "Hinge_Side"></variable>
<variable name= "Hinge_Type"></variable>
<variable name= "EGE"></variable>
</label>
<labels FORMAT="lib://FRD/SpecialMessage.btw" PRINTERNAME="IBM 6700-R80 (300 dpi)" _QUANTITY="1">
<label>
<variable name= "Serial_Number">1945.1.1.2-1</variable>
<variable name= "Special_Message">This is special Message Label</variable>
<variable name= "Cabinet_Sequence_No">110</variable>
</label>
</labels>
Please suggest.>
XML can only have one root element per file.
>
from XML Document: The Root Element -
Dear Team,
In the control center, when i launch from SAP backend or select work overview button in the web UI it prompts for the error as below;
The following error occurred in system XYZ : Error in view "IBO_WDC_INBOX.V_DEFAULT": Only one MessageArea UI Element is allowed to be visible
Kindly suggest and advice.
All the ACF's are activated as mentioned.
Best Regards,
Shashikumar BSWhat is your SAP version, including EHP and SP levels? See if SAP note 1818992 is relevant for your system and if it is make sure it is applied.
-
XML document must have a top level element. Error processing resource
Hi,
I am trying to send a XML file to a web browser from a servlet. I read the contents of the XML file into a string and I am sending it to the brower. Before I do this I set the 'Content-type' header of the httpResponse to "application/xml" . Embedded in the XML file is an xml-stylesheet elemetn indicating which *.xsl stylesheet to use to parse the XML content.
I get the following error:
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing resource 'http://127.0.0.1:8080/testReplyingXML/xml-to-html.xs...
Now, if I take the stylesheet element out of the XML string I sent, then the browser stores the content into and *.xml file. I manually run the "xml-to-xsl " stylesheet mentioned in the error output above, and there is no problem, the xml content gets successfully transformed in a viewable HTML .
It is only when I embed the "stylesheet" element into the XML content that I get this error.
So the browser is receiveing valid XML.
I am not sure if the above error is complaining about the XML content I send or the stylesshet .
Does anyone have an idea of what am I doing wrong?
For your information here are my servlet code and the XML file:
servlet:-
package webapps.testReplyingXML;
import java.io.BufferedReader;
import java.io.IOException;
import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import java.io.FileReader;
import java.util.Enumeration;
import java.util.StringTokenizer;
import java.io.PrintWriter;
public class ReplyXML extends HttpServlet {
static int transactionCount = 0;
public void doGet(HttpServletRequest req, HttpServletResponse res) throws ServletException ,IOException {
String Q_PARAM = "query";
String requestString = req.getQueryString();
for ( Enumeration en = req.getParameterNames() ; en.hasMoreElements() ; )
String k = (String)en.nextElement() ;
String[] x = req.getParameterValues(k) ;
String s = null;
String DATA_PARAM= "";
for(int i = 0 ; i < x.length ; i++ )
s = x[i] ;
//System.out.println("s = " + s);
if (k.equals("query")){
try {
//res.setHeader("Content-Type", "application/xml");
//res.setHeader("Transfer-Encoding", "chunked");
//res.setHeader("Cache-Control", "no-cache");
//res.setHeader("Server", "Jetty/5.1.10");
//res.setHeader("Pragma", "no-cache");
//res.setHeader("X-Joseki-Server", "Joseki-3.0-dev");
res.setStatus(res.SC_OK);
StringBuffer fileData = new StringBuffer(1000);
BufferedReader reader = new BufferedReader(new FileReader("sparql_results.xml"));
char[] buf = new char[1024];
int numRead=0;
while((numRead=reader.read(buf)) != -1){
String readData = String.valueOf(buf, 0, numRead);
fileData.append(readData);
buf = new char[1024];
reader.close();
String xmlMsg= fileData.toString();
System.out.println("XMLMSG= " + xmlMsg);
PrintWriter outresp = res.getWriter();
outresp.println(xmlMsg);
outresp.close();
}catch (Exception e) {
e.printStackTrace();
public void doPost(HttpServletRequest req, HttpServletResponse res) throws ServletException, IOException {
doGet(req, res);
XML FILE:
<?xml version="1.0"?>
<?xml-stylesheet type="text/xsl" href="xml-to-html.xsl"?>
<sparql
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xs="http://www.w3.org/2001/XMLSchema#"
xmlns="http://www.w3.org/2005/sparql-results#" >
<head>
<variable name="book"/>
<variable name="title"/>
</head>
<results ordered="false" distinct="false">
<result>
<binding name="book">
<uri>http://example.org/book/book6</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Half-Blood Prince</literal>
</binding>
</result>
<result>
<binding name="book">
<uri>http://example.org/book/book5</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Order of the Phoenix</literal>
</binding>
</result>
<result>
<binding name="book">
<uri>http://example.org/book/book4</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Goblet of Fire</literal>
</binding>
</result>
<result>
<binding name="book">
<uri>http://example.org/book/book3</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Prisoner Of Azkaban</literal>
</binding>
</result>
<result>
<binding name="book">
<uri>http://example.org/book/book2</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Chamber of Secrets</literal>
</binding>
</result>
<result>
<binding name="book">
<uri>http://example.org/book/book1</uri>
</binding>
<binding name="title">
<literal>Harry Potter and the Philosopher's Stone</literal>
</binding>
</result>
</results>
</sparql>Error processing resource http://127.0.0.1:8080/testReplyingXML/xml-to-html.xs...
Well, if one more character had been deleted from that message then you would have a problem. But as it is, the error message says there's an error processing a resouce whose name ends with "xml-to-html.xs" followed by something. That would be the stylesheet if I'm not mistaken. Most likely the browser can't find it at the URL mentioned in the error message. -
Error using SOAPRunner: XML document must have top level element
Hi all,...................xMII 11.5.3 b66
I am attempting to consume a BLS transaction as a web service from a J2EE app.
When I test it with http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetListOfPlants I am getting an error message from the browser. The BLS transaction works fine when called from a Query template. What am I missing?
The XML page cannot be displayed
Cannot view XML input using style sheet.
Please correct the error and then click the Refresh button, or try again later.
XML document must have a top level element. Error processing
resource 'http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetL...
WSDL from WSDLGen...
<?xml version="1.0" encoding="UTF-8" ?>
- <definitions xmlns="http://schemas.xmlsoap.org/wsdl/"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/"
xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:s="http://www.w3.org/2001/XMLSchema"
xmlns:s0="http://www.sap.com/xMII"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap/"
xmlns:soapenc="http://schemas.xmlsoap.org/soap/encoding/" targetNamespace="http://www.sap.com/xMII">
- <!-- Types
-->
- <types>
- <s:schema elementFormDefault="qualified" targetNamespace="http://www.sap.com/xMII">
- <s:complexType name="InputParams">
- <s:sequence id="InputSequence">
<s:element maxOccurs="1" minOccurs="0" name="RequestXML" type="s:Xml" />
<s:element maxOccurs="1" minOccurs="0" name="RowCount" type="s:long" />
<s:element maxOccurs="1" minOccurs="0" name="RowSkips" type="s:long" />
<s:element maxOccurs="1" minOccurs="0" name="Table" type="s:string" />
</s:sequence>
</s:complexType>
- <s:element name="XacuteRequest">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="LoginName" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="LoginPassword" type="s:string" />
<s:element maxOccurs="1" minOccurs="0" name="InputParams" type="s0:InputParams" />
</s:sequence>
</s:complexType>
</s:element>
- <s:complexType name="Rowset">
- <s:sequence>
<s:element maxOccurs="unbounded" minOccurs="0" name="Row" type="s0:Row" />
</s:sequence>
<s:attribute name="Message" type="s:string" />
</s:complexType>
- <s:complexType name="Row">
- <s:sequence id="RowSequence">
<s:element maxOccurs="1" minOccurs="1" name="ErrorMessage" type="s:string" />
<s:element maxOccurs="1" minOccurs="1" name="OutputXML" type="s:string" />
</s:sequence>
</s:complexType>
- <s:element name="XacuteResponse">
- <s:complexType>
- <s:sequence>
<s:element maxOccurs="1" minOccurs="0" name="Rowset" type="s0:Rowset" />
</s:sequence>
</s:complexType>
</s:element>
</s:schema>
</types>
- <!-- Messages
-->
- <message name="XacuteSoapIn">
<part element="s0:XacuteRequest" name="parameters" />
</message>
- <message name="XacuteSoapOut">
<part element="s0:XacuteResponse" name="parameters" />
</message>
- <!-- Ports
-->
- <portType name="XacuteWSSoap">
- <operation name="Xacute">
<input message="s0:XacuteSoapIn" />
<output message="s0:XacuteSoapOut" />
</operation>
</portType>
- <!-- Bindings
-->
- <binding name="XacuteWSSoap" type="s0:XacuteWSSoap">
<soap:binding style="document" transport="http://schemas.xmlsoap.org/soap/http" />
- <operation name="Xacute">
<soap:operation soapAction="http://www.sap.com/xMII" style="document" />
- <input>
<soap:body use="literal" />
</input>
- <output>
<soap:body use="literal" />
</output>
</operation>
</binding>
- <!-- Service mapping
-->
- <service name="XacuteWS">
- <port binding="s0:XacuteWSSoap" name="XacuteWSSoap">
<soap:address location="http://naholldo31020/Lighthammer/SOAPRunner/Amy/GetListOfPlants" />
</port>
</service>
</definitions>Hi Amy,
here is an example how you can call a WS via http GET:
http://<server>/Lighthammer/Runner?Transaction=<path_to_your_TRX>&XacuteLoginName=YourAccount&XacuteLoginPassword=yoursecret&outputparameter=*
Please note you do not need to use credentials in case you calling localhost.
I think in your case this should be the right url:
http://naholldo31020/Lighthammer/Runner?Transaction=Amy/GetListOfPlants&XacuteLoginName=YourAccount&XacuteLoginPassword=yoursecret&outputparameter=*
Please change parameters for
- XacuteLoginName
- XacuteLoginPassword
- outputparameter (you can specify * or one of your transaction output parameter) -
Builder allows for more than one Top-Level VI. The resulting Executable launches both applications at once. If I terminate one application, is there anyway to launch it again programmatically?
You could monitor the names of all the VI's in memory. If the one you want running is not in the list, you can launch it dynamically.
Ben
Ben Rayner
I am currently active on.. MainStream Preppers
Rayner's Ridge is under construction -
Horizontal menu with one top level having pages below.
I have reviewed the answer to a similar post and reviewed the settings as shown in the image. My problem is that I want this one menu item to display the pages vertically and not drop down, and display to the right. I have tried every way of setting the menu preferences I can think of and it refuses not to impact the menu as a whole. This includes unchecking the box that allows individual edits. Can someone provide me a text procedure step by step to make my one top level menu item display the pages dropped down vertically for selection as opposed to down and right? This is the latest version of Muse. The menu widget was created by allowing it to detect the pages the way they were set in design mode.
Ok just in case any other new users to muse have the same problem with a horizontal menu needing to have one of the top level links drop down a vertical menu below. Initally in plan view I had created the top level page, and all the other pages below stacked vertically. What I did to make it display the way I wanted is to delete the pages stacked vertically and place them on the same line horizontally. See below .....
-
XML document must have a top level element. Error
Hi, I am trying to generate an XML. Below is a sample code from my function. The function generates a 0 byte file which when I try to open gives me 'xml document must have a top level element' error. Any ideas?
FUNCTION generateXml( p_1 VARCHAR2,
p_2 VARCHAR2,
p_3 VARCHAR2
) RETURN CLOB
IS
ctx dbms_xmlgen.ctxHandle;
xml CLOB;
v_sql varchar2(2000);
BEGIN
lv_sql:=' select * from v_dc where rownum =1';
ctx := dbms_xmlgen.newContext(v_sql);
dbms_xmlgen.setRowSetTag(ctx, 'CONTENT');
xml := dbms_xmlgen.getXML(ctx);
return xml;
END;
END generateXml;I just need to understand if we can generate XML from a sql that has sub-queries in it.Should be no problem:
SQL> create or replace function generatexml (p_1 varchar2, p_2 varchar2, p_3 varchar2)
return clob
is
ctx dbms_xmlgen.ctxhandle;
xml clob;
v_sql varchar2 (2000);
begin
v_sql := ' select * from dept left outer join (select * from emp) emp on (emp.deptno = dept.deptno) where rownum = 1';
ctx := dbms_xmlgen.newcontext (v_sql);
dbms_xmlgen.setrowsettag (ctx, 'CONTENT');
xml := dbms_xmlgen.getxml (ctx);
dbms_xmlgen.closecontext (ctx);
return xml;
end generatexml;
Function created.
SQL> select generatexml (null, null, null) xml from dual
XML
<?xml version="1.0"?>
<CONTENT>
<ROW>
<DEPTNO>10</DEPTNO>
<DNAME>ACCOUNTING</DNAME>
<LOC>NEW YORK</LOC>
<EMPNO>7782</EMPNO>
<ENAME>CLARK</ENAME>
<JOB>MANAGER</JOB>
<MGR>7839</MGR>
<HIREDATE>09.06.81</HIREDATE>
<SAL>2450</SAL>
<DEPTNO>10</DEPTNO>
</ROW>
</CONTENT>
1 row selected.Maybe your query simply doesn't return any rows? -
Nodes with Only One Lower-Level Node = Hide
Hi everyone
Have anyone present this situation:
Iu2019ve a quey to report inventory aging. It has two hierarchies to show data. In Rows I have Major Markets and in Columns a date hierarchy to show aging Ex: from 0 to 8 months, 9+ and 13+. Of course here I have also value and volume.
Query reports all values for all major markets fine. When I filter one major market, letu2019s say France also brings detailed figures but when I add any drill down in rows all values goes to cero (0).
Te estrange is that if you swap drill down order with major markets or drill down by columns with the same characteristic figures come out again as usual.
I know this sounds like a SAP note but I have not been able to find it either.
Thanks a lot for your help, and of course points will be assignedu2026..
Ps. Important, this happen when option u201CNodes with Only One Lower-Level Node = Hideu201D (this is selected on purpose because there are some repeated nodes in major market hierarchy Ex. France u2013 France and if there is just one value under first node then means that only display of last one is necessary to avoid repeated values).Solution we found is to remove flag "Do not display leaves for inner-nodes in the query", directly on the hierarchy.
Thanks -
XML document must have a top level element
Hi all,
I have deployed my web services in 904. When I try to see the generated wsdl, I am seeing:
XML document must have a top level element.
in IE. Does anyone know why?
Thanks.If you take a look under the location where the application was deployed, you should find a file with the name of your interface (or class) and the extension .wsdl.
If there is already a file of that name, we do not try to re-generate it. If this file is not a valid XML file, then it will explain the error message you are seing.
Another reason for this error is when the code generation fail silently. It can occurs in some rare case, when you have started oc4j using a JRE instead of JDK (without javac).
Hope this helps,
Eric -
I need to host a Shared PDF on SharePoint 2010. If it is on SharePoint can only one person comment at a time? I know documents have to be checked out when using SharePoint. I need multiple users to be able to comment in real time and see comments in real time. Is this possible?
try here:
http://www.bbb.org
File a complaint with them. Verizon will call you to fix the blunder.
But remember it is always up to the customer to insure what they are getting and what it costs. Don't trust the word of a sales person who makes their living on getting that sale. Lies, deceit or false promises will be and have been used by sales people for thousands of years.
Good Luck -
"Only one EHP Level in the system"?
I am reading a blog called "SAP enhancement packages for SAP ERP".
At page 22, it says:
"An Application system can only consist of one EHP level (e.g. EHP3 or EHP4). Hence installed
EHP components have to be updated with every future EHP implementation."
I do not quite understand above statement.
1) how can a system have 2 EHP levels?
2) If our PROD system is too busy to have the downtime to be updated with the future EHP, what will happen?
Please share your opinion. Thanks!As of EHP3, you could still install some EHP components. On an ERP 6.00, you could just push SAP_APP to 6.03 and move on. Now if you want another component in your system with an EHP4 version, you can't have some components at EHP3 and some at EHP4. You would install EHP4 for the new component you desire updated and part of the work will be to also update SAP_APP to 6.04.
EHP4 is an UPGRADE process, with shadow instance & all the joy of an upgrade process. You can either run ressource minimized or downtime minimized. In resource minimized, the shadow instance runs on the same server as the main instance. Downtime minimized allow to run the shadow instance on a separate / new server. Anyway you go, you will always have a "Downtime Phase" when you bring back the updated components from the shadow instance toward the real production one.
As with any UPGRADE project, the benefits of installing EHP4 for your business has to weighted against the downtime cost.
Our tests so far on small systems (few data, few users, 120GB database) show ~3 days process from EHP3 to EHP4 (all components) with a downtime phase of about 22 hours using the "resource minimized" path, i.e. shadow & main instance on the same server (4 CPUs, 16GB RAM). Until you give a try at your Sandbox or DEV systems, you won't have realistic figures for your environment.
Good luck! -
Hello,
When playing my video, it shows only the left audio level moving, therefore making my project come out of only one speaker. How can I get both audio levels to work? I thought I had stereo pairs - the audio tracks are linked. Thanks.Please look at this thorough article on audio in FCP from Ken Stone.
It explains, among many other aspects, what panning is, and what the pan control does to your audio tracks.
Final Cut Pro Audio Essentials
Optimizing Sound For Beginners
http://www.kenstone.net/fcphomepage/audio_essentials_fcp4.html -
Enumerating projects in solution, only gives top level projects??
Hi,
I have a VSPackage and I want to enumerate all the projects in the solution. To do this I use:
var dte = Package.GetGlobalService(typeof (SDTE)) as DTE;for (var i = 1; i <= dte.Solution.Projects.Count; i++) { var project = dte.Solution.Projects.Item(i); //do something here }
This works well on simple solutions but if I have my solution organised into folders then I just get back a list of the folders.
For example, if the solution looks like this in solution explorer:
Solution.Sln
\Business
\ABC.proj
\DEF.proj
\ZX1.proj
\Data
\HIJ.proj
I will get back a project for \Business, \ZX1 and \Data (which aren't even projects) so it looks like the enumeration isn't projects but top level items in the solution.
Is this correct? Is there an easy way to get all projects or do I need to recurse down and get every project item?
edThat doesn't sound right. I would have thought the Projects collection would just contain the actual project, but I almost never use those solution folders, so it's not something I've encountered before.
A better option might be
IVsSolution.GetProjectEnum. I'm pretty sure that works as documented.
Sincerely,
Ed Dore
Maybe you are looking for
-
plis help me with this, is like my pc is not recognize the iphone like an usual connection network, always ask me the type of connection network like the first time i plug in my iphone i see this since the new iphone software update to ios 5 sorry
-
ITunes 7.1.1 stops responding after several hours
My Intel iMac is Wifi connected to the Internet. I like to listen to iTunes(Radio-Jazz Genre) and I have iTunes sending music to my downstairs stereo via AirTunes to an AirPort Express. I will be downstairs reading or cooking and notice that the musi
-
How can I import songs from itunes onto someone elses ipod?
Im trying to put some songs on my friends ipod but its not letting me and i can't figure it out. Please help me thank you!!
-
Zen Extra 60GB - errors and questi
I recently purchased the Zen Jukebox Extra after running out of room on my iRi'ver 20GB. I loved the iRi'ver, but needed more storage. I notcied that on several ocassions after not using the Zen for a few days, I would power it up and it would go to
-
Hi, i'm new to java. need help setting the path in win XP
hi all, i'm new to java technology. i've just downloaded the JDK and ran my first java program (hello world). i love it. java's gr8. i need help. i run win XP and how can i setup the path sothat i can execute my programs from the root dir??? any help