No root element found in xml

I am facing a problem when i am trying to use TOAD. Its giving me an error like
NO ROOT ELEMENT FOUND IN XML. Can someone help me in corrcting this Error ?
Regards,
Chandra deep

NO ROOT ELEMENT FOUND IN XML. Can someone help me in
corrcting this Error ? That means the XML document is either missing the surrounding <element> ... </element> pair or has more than one pair at the base level of the document. Resolve that and you are done.
Now ... given that I am probably 4,000+ km away from you and can not see your screen, please look at your question and ask yourself whether you have given sufficient information for troubleshooting. <g>

Similar Messages

  • So what's the deal with missing context-root element in domain.xml?

    I see that this issue has come up in the past:
    If one hand modifies an application's web.xml file and tries to deploy using JSC, the application's corresponding web-module element's context-root gets nuked in the app server's domain.xml file. The only way I can get the server AND app to successfully run is to manually add context-root back in and manually restart the server (whether from JSC Deployment Server tree node or from the Start Menu (I'm running on XP Pro.) Trying to start either/both from the Run Project button on JSC recreates the problem. Is this a bug? Am I doing something wrong? If bug, will this be addressed soon?

    Here's what I did:
    1. I created a simple HelloWorld JSF project & tested that it compiled, deployed & ran fine using built-in AppServer.
    2. Switched Project View to FileSystem view & opened src/web/WEB-INF/web.xml for editing
    3. Inserted security-constraint
        <!-- Security -->
        <security-constraint>
              <display-name>SecurityConstraint</display-name>
              <web-resource-collection>
                 <web-resource-name>WRCollection</web-resource-name>
                 <url-pattern>/*</url-pattern>
              </web-resource-collection>
              <auth-constraint>
                 <role-name>admin</role-name>
              </auth-constraint>
              <user-data-constraint>
                 <transport-guarantee>NONE</transport-guarantee>
              </user-data-constraint>
        </security-constraint>  4. Tried to deploy & get deplyment failure messages.
    5. Looking in to the %APPSERVERROOT%/domains/creator/config/domain.xml file shows that the HelloWorld webmodule line looks as follows:
    <web-module enabled="true" location="c:/Documents and Settings/Jake Ochs/My Documents/Creator/Projects/HelloWorld/build" name="_helloworld" object-type="user"/>(notice how "context-root" is missing & now needs to be added manually to getthe app to run again.

  • Root Element of a Text Node

    Hi All,
    I have the following XML Document.
    <?xml version="1.0"?>
    <addressbook>
    <address>
    <fname>Bill</fname>
    <lname>Gates</lname>
    <address>
    <address>
    <fname>Jones</fname>
    <lname>Bill</lname>
    <address>
    <address>
    <fname>Mark</fname>
    <lname>Anderson</lname>
    <address>
    <address>
    <fname>Bill</fname>
    <lname>Sam</lname>
    <address>
    <address>
    <fname>Charles</fname>
    <lname>Corbel</lname>
    <address>
    </addressbook>
    I need all the root element in the xml Document which has the data "Bill". How i can find that?
    Thanks in Advance,
    Mohideen.

    Hi Amaury,
    Thanks for your response.
    Already, I have been working on the logic that you had suggested. But it complicates the code much.
    I found JDOM API has the Text class with constructor of the type
    Text(java.lang.String str).I used that in my class.
    Here is the code,
    import org.jdom.*;
    import org.jdom.JDOMException;
    import org.jdom.input.SAXBuilder;
    public class SearchText
    public static void main(String[] args)
    try
    // use SAXBuilder to create DOM from numerous types of input
    SAXBuilder builder = new SAXBuilder();
    // expand entities within the SAXBuilder
    //builder.setExpandEntities(true);
    // SAXBuilder is more does create the entire DOM at once
    org.jdom.Document doc = builder.build(args[0]);
    System.out.println( doc );
    Text text = new Text("bill");
    //how to find out this text object in the Document class object
    Element parent = text.getParent();
    System.out.println("Parent:"+parent.toString());
    catch (JDOMException e)
    e.printStackTrace();
    I am getting the following run time error,
    Exception in thread "main" java.lang.NullPointerException
    at SearchText.main(SearchText.java:24)
    Please kindly notify me where i did the mistake.
    Thanks,
    Mohideen.

  • Root element charts not defined in schema error??

    My xsd file is
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://www.datastay.com/schema" elementFormDefault="qualified" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:target="http://www.datastay.com/schema">
         <xs:element name="time" type="xs:positiveInteger" default="1"/>
         <xs:element name="timeType" default="weeks">
              <xs:simpleType>
                   <xs:restriction base="xs:string">
                        <xs:enumeration value="days"/>
                        <xs:enumeration value="weeks"/>
                   </xs:restriction>
              </xs:simpleType>
         </xs:element>
         <xs:element name="refresh">
              <xs:complexType>
                   <xs:all>
                        <xs:element ref="target:time"/>
                        <xs:element ref="target:timeType"/>
                   </xs:all>
              </xs:complexType>
         </xs:element>
         <xs:element name="query">
              <xs:complexType>
                   <xs:simpleContent>
                        <xs:extension base="xs:string">
                             <xs:attribute name="series" type="xs:string" use="required"/>
                        </xs:extension>
                   </xs:simpleContent>
              </xs:complexType>
         </xs:element>
         <xs:element name="chartDefinition">
              <xs:complexType>
                   <xs:all>
                        <xs:element ref="target:refresh"/>
                        <xs:element ref="target:query"/>
                   </xs:all>
                   <xs:attribute name="id" type="xs:ID" use="required"/>
                   <xs:attribute name="title" type="xs:string" use="required"/>
                   <xs:attribute name="type" type="xs:string" use="required"/>
                   <xs:attribute name="xaxislabel" type="xs:string" use="required"/>
                   <xs:attribute name="yaxislabel" type="xs:string" use="required"/>
                   <xs:attribute name="classType" default="com.dms.chart.DefaultChartBusinessHandler">
                        <xs:simpleType>
                             <xs:restriction base="xs:string">
                                  <xs:enumeration value="com.dms.chart.DefaultChartBusinessHandler"/>
                                  <xs:enumeration value="com.dms.chart.PieChartBusinessHandler"/>
                             </xs:restriction>
                        </xs:simpleType>
                   </xs:attribute>
                   <xs:attribute name="width" type="xs:int" default="500"/>
                   <xs:attribute name="height" type="xs:int" default="500"/>
                   <xs:attribute name="chartColor" type="xs:string" default="#FFFFFF"/>
              </xs:complexType>
         </xs:element>
         <xs:element name="charts">
              <xs:complexType>
                   <xs:sequence>
                        <xs:element ref="target:chartDefinition"/>
                   </xs:sequence>
              </xs:complexType>
         </xs:element>
    </xs:schema>
    My xml file is
    <?xml version="1.0"?>
    <charts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="C:\Tomcat4\webapps\chart\WEB-INF\files\chartdefs.xsd">
    <chartDefinition id="1" title="Monthly Logins" type="verticalbar3d" xaxislabel="Month" yaxislabel="Logins" classType="com.dms.chart.DefaultChartBusinessHandler" width="500" height="750" chartColor="#FFFFFF">
    <refresh>
    <timeType>
    minutes
    </timeType>
    <time>
    1
    </time>
    </refresh>
    <query series="john">
              select * from defaultchart where name = 'john'
    </query>
    <query series="max">
              select * from defaultchart where name = 'max'
    </query>
    </chartDefinition>
    <chartDefinition id="2" title="Average Workflow life span" type="pie3d" xaxislabel="Workspace" yaxislabel="Days" classType="com.dms.chart.PieChartBusinessHandler" width="500" height="500" chartColor="#FFFFFF">
    <refresh>
         <timeType>
    minutes
    </timeType>
         <time>
    5
    </time>
    </refresh>
    <query series="john">
         select * from defaultchart where name = 'mike'
    </query>
    </chartDefinition>
    </charts>

    Copy the schema and the XML document to the same directory.
    The root element of the XML document specifies the location of the schema.
    <?xml version="1.0"?>
    <charts xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="chartdefs.xsd">The xs:schema element:
    <xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">

  • How do I change alphabetical element listing in xml to nested xml using xslt?

    Have an 'Bus Card Request' indd form exported to fillable form pdf (reader enabled etc). Have 'Bus Card Template' indd to receive the BC data from the returned filled pdf form.
    The tags & structure are identical on both indd docs.
    The xml exported from the pdf discards the structure (nesting) and provides all the elements in alphabetical order.
    I am a novice learning how to make an xslt that will transform the alphabetical listing back to the nested structure.
    I want to turn this:
    <?xml version="1.0" encoding="UTF-8"?>
    <fields xmlns:xfdf="http://ns.adobe.com/xfdf-transition/">
    <Address>1234 Take Wing</Address>
    <Cell_Number>619.321.6878</Cell_Number>
    <City>San Diego</City>
    <Clin_Sup_Lic_Number>SL00267</Clin_Sup_Lic_Number>
    <Clinical_Supervisor_Name>Jarmal Hincks</Clinical_Supervisor_Name>
    <ComboBox2 xfdf:original="Combo Box 2">sdyouthservices.org</ComboBox2>
    <Date_Signed_Loc_Dir>9/29/2014a</Date_Signed_Loc_Dir>
    <Date_Signed_Orig>9/29/2014</Date_Signed_Orig>
    <Degree>MA</Degree>
    <Email_Address>s.reeves</Email_Address>
    <Extension>1234</Extension>
    <Fax_Number>619.123.9876</Fax_Number>
    <Intern_Number>XX20</Intern_Number>
    <License_Number>YY20</License_Number>
    <Location>Point Loma Campus</Location>
    <Name>Steve Reeves</Name>
    <Notes_and_Comments>Make it a super duper bus card</Notes_and_Comments>
    <Program>Learning Curve</Program>
    <State>CA</State>
    <Telephone_Number>619.123.4567</Telephone_Number>
    <TextField27 xfdf:original="Text Field 27">www.sdyouthservices.org</TextField27>
    <Title>Superman</Title>
    <Zip>99999</Zip>
    </fields>
    into this:
    <BC_Order>
    <Group_Name>
       <Name></Name>
       <Degree></Degree>
       
<Title></Title>
       <Intern_Number></Intern_Number>
       <License_Number></License_Number>
    </Group_Name>
    <Group_Location>
       <Location></Location>
      
<Program></Program>
      
<Address></Address>

      <City></City>
      <State></State>
      <Zip></Zip>
    </Group_Location>
    <Group_Phone>
      <Telephone_Number></Telephone_Number>
      <Extension></Extension>

      <Fax_Number></Fax_Number>
      <Cell_Number></Cell_Number>
    </Group_Phone>
    <Group_Email-WS>
      <Email_Address></Email_Address>
      <eMail_Host></eMail_Host>

      <Website></Website>

      <Clinical_Supervisor_Name></Clinical_Supervisor_Name>
      <Clin_Sup_Lic_Number></Clin_Sup_Lic_Number>
    </Group_Email-WS>
    </BC_Order>
    Is this xslt code on the right track?
    (i've left out the usual header stuff)
    <BC_Order>
    <Group_Name>
    <Name><xsl:value-of select="Name"/></Name>
    <Degree><xsl:value-of select="Degree"/></Degree>
    <Title><xsl:value-of select="Title"/></Title>
    <Intern_Number><xsl:value-of select="Intern_Number"/></Intern_Number>
    <License_Number><xsl:value-of select="License_Number"/></License_Number>
    </Group_Name>
    </BC_Order>
    I'm just trying to figure out what the words are to make nesting occur in the resultant xml so it will match the nesting order in the Bus Card input template.
    Thanks!
    Paul

    Hi Paul,
    Is this xslt code on the right track?
    Yes, no...
    The root element in the XML from the form is "fields" without the quote marks. So the XSL needs the full path to the elements to include the "fields" root element. The select would therefore be "<xsl:value-of select="fields/Name" />"
    Note that because I like seeing the XML with line breaks, the "<xsl:text>&#xA;</xsl:text>" precedes each line. Without that, one gets a long string. But it isn't really needed and there are other means of accomplishing it.
    I think the below will do what you need.
    Take care, Mike
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="/">
    <xsl:text>&#xA;</xsl:text><BC_Order>
    <xsl:text>&#xA;</xsl:text><Group_Name>
    <xsl:text>&#xA;</xsl:text><Name><xsl:value-of select="fields/Name" /></Name>
    <xsl:text>&#xA;</xsl:text><Degree><xsl:value-of select="fields/Degree" /></Degree>
    <xsl:text>&#xA;</xsl:text><Title><xsl:value-of select="fields/Title" /></Title>
    <xsl:text>&#xA;</xsl:text><Intern_Number><xsl:value-of select="fields/Intern_Number" /></Intern_Number>
    <xsl:text>&#xA;</xsl:text><License_Number><xsl:value-of select="fields/License_Number" /></License_Number>
    <xsl:text>&#xA;</xsl:text></Group_Name>
    <xsl:text>&#xA;</xsl:text><Group_Location>
    <xsl:text>&#xA;</xsl:text><Location><xsl:value-of select="fields/Location" /></Location>
    <xsl:text>&#xA;</xsl:text><Program><xsl:value-of select="fields/Program" /></Program>
    <xsl:text>&#xA;</xsl:text><Address><xsl:value-of select="fields/Address" /></Address>
    <xsl:text>&#xA;</xsl:text><City><xsl:value-of select="fields/City" /></City>
    <xsl:text>&#xA;</xsl:text><State><xsl:value-of select="fields/State" /></State>
    <xsl:text>&#xA;</xsl:text><Zip><xsl:value-of select="fields/Zip" /></Zip>
    <xsl:text>&#xA;</xsl:text></Group_Location>
    <xsl:text>&#xA;</xsl:text><Group_Phone>
    <xsl:text>&#xA;</xsl:text><Telephone_Number><xsl:value-of select="fields/Telephone_Number" /></Telephone_Number>
    <xsl:text>&#xA;</xsl:text><Extension><xsl:value-of select="fields/Extension" /></Extension>
    <xsl:text>&#xA;</xsl:text><Fax_Number><xsl:value-of select="fields/Fax_Number" /></Fax_Number>
    <xsl:text>&#xA;</xsl:text><Cell_Number><xsl:value-of select="fields/Cell_Number" /></Cell_Number>
    <xsl:text>&#xA;</xsl:text></Group_Phone>
    <xsl:text>&#xA;</xsl:text><Group_Email-WS>
    <xsl:text>&#xA;</xsl:text><Email_Address><xsl:value-of select="fields/Email_Address" /></Email_Address>
    <xsl:text>&#xA;</xsl:text><eMail_Host><xsl:value-of select="fields/ComboBox2" /></eMail_Host>
    <xsl:text>&#xA;</xsl:text><Website><xsl:value-of select="fields/TextField27" /></Website>
    <xsl:text>&#xA;</xsl:text><Clinical_Supervisor_Name><xsl:value-of select="fields/Clinical_Supervisor_Name" /></Clinical_Supervisor_Name>
    <xsl:text>&#xA;</xsl:text><Clin_Sup_Lic_Number><xsl:value-of select="fields/Clin_Sup_Lic_Number" /></Clin_Sup_Lic_Number>
    <xsl:text>&#xA;</xsl:text></Group_Email-WS>
    <xsl:text>&#xA;</xsl:text></BC_Order>
    </xsl:template>
    </xsl:stylesheet>

  • Problem in digitally signing a particular element of an XML Document

    hi all!!
    I was trying to sign a particular element of an XML document using JSR105 (XML Digital Signatures) API.
    For which i used +#xpointer(id('idvalue'))+ and +#idvalue+ as the URI for the reference i create as below :
    Reference ref = fac.newReference("#xpointer(id('123')) ", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null)), null, null);
    NOTE: Here 123 is the value of the attribute 'id' of the element i wish to sign in the input XML document.
    But when i try to digest and sign the the above created reference, i get the following exception (which is strange! atleast for me!)
    Exception in thread "main" javax.xml.crypto.dsig.XMLSignatureException: javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:327)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.sign(ReferenceImpl.java:237)
    at com.ibm.xml.crypto.dsig.dom.XMLSignatureImpl.sign(XMLSignatureImpl.java:158)
    at sent.Generate.main(Generate.java:103)
    Caused by: javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.URIDereferencerImpl.dereference(URIDereferencerImpl.java:193)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:285)
    +... 3 more+
    javax.xml.crypto.URIReferenceException: Can't resolve ID: '123' in ''
    at com.ibm.xml.crypto.dsig.dom.URIDereferencerImpl.dereference(URIDereferencerImpl.java:193)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.calculateDigestValue(ReferenceImpl.java:285)
    at com.ibm.xml.crypto.dsig.dom.ReferenceImpl.sign(ReferenceImpl.java:237)
    at com.ibm.xml.crypto.dsig.dom.XMLSignatureImpl.sign(XMLSignatureImpl.java:158)
    at sent.Generate.main(Generate.java:103)
    I've given the whole Java code i used to generate the signature and the XML i used below for you to get a clear picture of what i tried...
    Any suggestions are very much welcome..
    thanks..
    ragu
    Generate.java
    import java.io.File;
    import java.io.FileInputStream;
    import java.io.FileNotFoundException;
    import java.io.FileOutputStream;
    import java.io.IOException;
    import java.io.OutputStream;
    import java.security.InvalidAlgorithmParameterException;
    import java.security.KeyException;
    import java.security.KeyPair;
    import java.security.KeyPairGenerator;
    import java.security.NoSuchAlgorithmException;
    import java.util.ArrayList;
    import java.util.Collections;
    import java.util.List;
    import javax.xml.crypto.MarshalException;
    import javax.xml.crypto.dsig.CanonicalizationMethod;
    import javax.xml.crypto.dsig.DigestMethod;
    import javax.xml.crypto.dsig.Reference;
    import javax.xml.crypto.dsig.SignatureMethod;
    import javax.xml.crypto.dsig.SignedInfo;
    import javax.xml.crypto.dsig.Transform;
    import javax.xml.crypto.dsig.XMLSignature;
    import javax.xml.crypto.dsig.XMLSignatureException;
    import javax.xml.crypto.dsig.XMLSignatureFactory;
    import javax.xml.crypto.dsig.dom.DOMSignContext;
    import javax.xml.crypto.dsig.keyinfo.KeyInfo;
    import javax.xml.crypto.dsig.keyinfo.KeyInfoFactory;
    import javax.xml.crypto.dsig.keyinfo.KeyValue;
    import javax.xml.crypto.dsig.spec.C14NMethodParameterSpec;
    import javax.xml.crypto.dsig.spec.TransformParameterSpec;
    import javax.xml.crypto.dsig.spec.XPathFilterParameterSpec;
    import javax.xml.parsers.DocumentBuilderFactory;
    import javax.xml.parsers.ParserConfigurationException;
    import javax.xml.transform.Transformer;
    import javax.xml.transform.TransformerException;
    import javax.xml.transform.TransformerFactory;
    import javax.xml.transform.dom.DOMSource;
    import javax.xml.transform.stream.StreamResult;
    import org.w3c.dom.Document;
    import org.xml.sax.SAXException;
    public class Generate {
          * @param args
          * @throws NoSuchAlgorithmException
          * @throws InvalidAlgorithmParameterException
          * @throws KeyException
          * @throws ParserConfigurationException
          * @throws IOException
          * @throws SAXException
          * @throws FileNotFoundException
          * @throws XMLSignatureException
          * @throws MarshalException
          * @throws TransformerException
         public static void main(String[] args) throws NoSuchAlgorithmException,
                   InvalidAlgorithmParameterException, KeyException,
                   FileNotFoundException, SAXException, IOException,
                   ParserConfigurationException, MarshalException,
                   XMLSignatureException, TransformerException {
              java.security.Security
                        .addProvider(new com.ibm.xml.crypto.IBMXMLCryptoProvider());
              XMLSignatureFactory fac = XMLSignatureFactory.getInstance("DOM",
                        new com.ibm.xml.crypto.IBMXMLCryptoProvider());
              //reference generation
              //its here where I point the URI to the element i want to digest
              Reference ref = fac.newReference("#xpointer(id('123'))", fac.newDigestMethod(DigestMethod.SHA1, null), Collections.singletonList(fac.newTransform(Transform.ENVELOPED,(TransformParameterSpec) null)), null, null);
              //signedinfo element generation
              SignedInfo si = fac
                        .newSignedInfo(fac.newCanonicalizationMethod(
                                  CanonicalizationMethod.INCLUSIVE,
                                  (C14NMethodParameterSpec) null), fac
                                  .newSignatureMethod(SignatureMethod.RSA_SHA1, null),
                                  Collections.singletonList(ref));
              KeyInfoFactory kif = fac.getKeyInfoFactory();
              //Create a DSA KeyPair
              KeyPairGenerator kpg = KeyPairGenerator.getInstance("RSA");
              kpg.initialize(512);
              KeyPair kp = kpg.generateKeyPair();
              KeyValue kv = kif.newKeyValue(kp.getPublic());
              // Create a KeyInfo and add the KeyValue to it
              KeyInfo ki = kif.newKeyInfo(Collections.singletonList(kv));
              // Instantiate the document to be signed
              DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();
              dbf.setNamespaceAware(true);
              Document doc = dbf.newDocumentBuilder().parse(
                        new FileInputStream(new File("shippedPedigree.xml")));
              // Create a DOMSignContext and specify the DSA PrivateKey and
              // location of the resulting XMLSignature's parent element
              DOMSignContext dsc = new DOMSignContext(kp.getPrivate(), doc
                        .getDocumentElement());
              //Create the XMLSignature (but don't sign it yet)
              XMLSignature signature = fac.newXMLSignature(si, ki);
              // Marshal, generate (and sign) the enveloped signature
              signature.sign(dsc);
              //writing the signed document back to the file
              OutputStream os;
              os = new FileOutputStream(new File("shippedpedigree.xml"));
              TransformerFactory tf = TransformerFactory.newInstance();
              Transformer trans = tf.newTransformer();
              trans.transform(new DOMSource(doc), new StreamResult(os));
    the "shippedPedigree.xml" i used to sign:
    <?xml version="1.0" encoding="UTF-8"?>
    <ped:pedigree xmlns:ped="urn:epcGlobal:Pedigree:xsd:1" xmlns:ds="http://www.w3.org/2000/09/xmldsig#">
    <ped:shippedPedigree id="123">
    <ped:documentInfo>
    <ped:serialNumber>2233</ped:serialNumber>
    <ped:version>ped:version</ped:version>
    </ped:documentInfo>
    <ped:signatureInfo>
    <ped:signerInfo>
    <ped:name>Joe Doe</ped:name>
    <ped:title>Manager</ped:title>
    <ped:telephone>800-521-6010</ped:telephone>
    <ped:email>[email protected]</ped:email>
    <ped:url>www.kittinginc.com</ped:url>
    </ped:signerInfo>
    <ped:signatureDate>2001-12-31T12:00:00</ped:signatureDate>
    <ped:signatureMeaning>Certified</ped:signatureMeaning>
    </ped:signatureInfo>
    <ped:itemInfo>
         <ped:lot>123</ped:lot></ped:itemInfo>
    </ped:shippedPedigree></ped:pedigree>
    ------------------------------------------------------------------------

    Sabarisri N wrote:
    Hi All,
    my xml is like below.
    <ns1:abcd>
    <ns2:a>1</ns2:a>
    <ns2:b>2</ns2:b>
    </ns1:abcd>
    If i try retrieving the value of the root element of this xml document,
    Node myroot=doc.getDocumentElement();
    String result=myroot.getNodeName();
    My output is ns1:abcd .. i want only "abcd"...
    The parser is returning the correct rootNodeName i.e ns1:abcd. rootNodeName always goes with the given input and returns the root element as is.
    >
    My xml will not always have same namespaces.. from the incoming xml i should first check, for the namespaces..Please give me some idea.
    I guess.. I need some namespace evaluation to be set..
    Refer below link it'll give idea of identifying XML-NAMESPACE-PREFIX
    http://java.sun.com/developer/Books/xmljava/ch03.pdf
    http://download.oracle.com/javaee/1.4/tutorial/doc/JAXPSAX9.html
    Please help me in this regard.
    Thanks,
    Sabarisri. N

  • OSM 7.0.2 - UpdateOrderProcessor: createDocument() : Start of root element

    Hi,
    I am trying to get the create order values from Xquery, I am getting the following error in weblogic logs. Did anyone face this issue and resolved
    ####<Apr 26, 2011 12:22:12 PM IST> <Error> <oms> <uranus> <OSMServer> <ExecuteThread: '14' for queue: 'oms.automation'> <oms-automation> <BEA1-6937527F01CA01
    6DBD79> <> <1303800732443> <BEA-000000> <xmlapi.UpdateOrderProcessor: createDocument() : Start of root element expected.
    oracle.xml.parser.v2.XMLParseException: Start of root element expected.
    at oracle.xml.parser.v2.XMLError.flushErrors1(XMLError.java:323)
    at oracle.xml.parser.v2.NonValidatingParser.parseRootElement(NonValidatingParser.java:373)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:314)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:225)
    at oracle.xml.jaxp.JXDocumentBuilder.parse(JXDocumentBuilder.java:155)
    at oracle.communications.ordermanagement.util.xml.XMLHelper.parse(Unknown Source)
    at com.mslv.oms.jsp.xmlapi.UpdateOrderProcessor.parseXmlData(Unknown Source)
    at com.mslv.oms.jsp.xmlapi.UpdateOrderProcessor.parseXmlData(Unknown Source)
    at com.mslv.oms.security.base.ControllerBean.updateOrderNoResponse(Unknown Source)
    at com.mslv.oms.security.base.OMSController_h9cupp_EOImpl.updateOrderNoResponse(OMSController_h9cupp_EOImpl.java:1523)
    at com.mslv.oms.security.base.OMSController_h9cupp_EOImpl_WLSkel.invoke(Unknown Source)
    at weblogic.rmi.internal.ServerRequest.sendReceive(ServerRequest.java:174)
    at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:222)
    at com.mslv.oms.security.base.OMSController_h9cupp_EOImpl_1031_WLStub.updateOrderNoResponse(Unknown Source)
    at com.mslv.oms.automation.TaskContextBean.updateOrderData(Unknown Source)
    at oracle.communications.ordermanagement.automation.plugin.AbstractScriptPluginImplementation.updateOrderData(Unknown Source)
    at oracle.communications.ordermanagement.automation.plugin.AbstractScriptPluginImplementation.runCommonFunctionality(Unknown Source)
    at oracle.communications.ordermanagement.automation.plugin.ScriptRunnerImpl.runScript(Unknown Source)
    at oracle.communications.ordermanagement.automation.plugin.AbstractScriptAutomator.run(Unknown Source)
    at com.mslv.oms.automation.plugin.AbstractAutomator._runAutomator(Unknown Source)
    at oracle.communications.ordermanagement.automation.plugin.ProvTest_ProvTest_ProvTest_ukntqy_EOImpl._runAutomator(ProvTest_ProvTest_ProvTest_ukntqy_E
    OImpl.java:133)

    Hello! I have such issue with custom automation plugin. I'm trying to update oder data calling next code:
    TaskContext taskContext = (TaskContext) context;
    taskContext.updateOrderData(generateOMSUpdateString(inputXML));
    static private String generateOMSUpdateString(String message) {
              StringBuffer osmUpdate = new StringBuffer("");
              try {
              osmUpdate = new StringBuffer
              ("<OrderDataUpdate xmlns=\"http://www.w3.org/2001/XMLSchema\""+
              " xmlns:xs=\"http://www.w3.org/2001/XMLSchema\"" +
              " xmlns:odu=\"http://www.metasolv.com/OMS/OrderDataUpdate\"" +
              " targetNameSpace=\"http://www.metasolv.com/OMS/OrderDataUpdate\">");
                   osmUpdate.append("<Add path=\"/subscriber_info/new_name\">"+message+"</Add>");
              osmUpdate.append("</OrderDataUpdate>");
              catch(Exception e) {
              return osmUpdate.toString();
    Formed osmUpdatemessage looks like this:
    <OrderDataUpdate xmlns="http://www.w3.org/2001/XMLSchema" xmlns:xs="http://www.w3.org/2001/XMLSchema" xmlns:odu="http://www.metasolv.com/OMS/OrderDataUpdate" targetNameSpace="http://www.metasolv.com/OMS/OrderDataUpdate"><Add path="/subscriber_info/new_name">Test Name</Add></OrderDataUpdate>
    Server log shows next error:
    Jul 8, 2011 3:17:35 PM ALMT oms Error BEA-000000 test.TestJmsReceiveAutomation: Error updating order data: orderId[182] orderHistId[3098]
    Have you any ideas how to debug this error?

  • ERROR:Start of root element expected

    hi,
    Can any one tell me what this error was. I am getting this error when i try to update a table.
    XML-0108: (Fatal Error) Start of root element expected.
    oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java, Compiled
    Code)
    at oracle.xml.sql.dml.OracleXMLSave.updateXML(OracleXMLSave.java, Compil
    ed Code)
    at samp3.main(samp3.java, Compiled Code)
    Thanks in advance,
    Joe

    hi,
    Can any one tell me what this error was. I am getting this error when i try to update a table.
    XML-0108: (Fatal Error) Start of root element expected.
    oracle.xml.sql.OracleXMLSQLException: Start of root element expected.
    at oracle.xml.sql.dml.OracleXMLSave.saveXML(OracleXMLSave.java, Compiled
    Code)
    at oracle.xml.sql.dml.OracleXMLSave.updateXML(OracleXMLSave.java, Compil
    ed Code)
    at samp3.main(samp3.java, Compiled Code)
    Thanks in advance,
    Joe

  • On passing XmlObject to webservice , Root element is truncated

    Hi,
    I am using weblogic 8.1 SP2
    I have created a XmlObject and when I am passing it on the Webservice deployed
    on .NET environment. Root element of Input XML from WLI is getting truncated.
    When WLI generated a SOAP Body, it doesnt take RootElement. So problem seems to
    be with WLI only.
    XML :
    <JobChangeDataTransfer xmlns="http://albertsons.com//HIRETERM" >
    <TransactionID>TEST_ALBERTSONS</TransactionID>
    <FormatNumber>TEST_ALBERTSONS</FormatNumber>
    </JobChangeDataTransfer>
    SOAP Message :
    <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    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">
    <SOAP-ENV:Body>
    <ns:DataExchange4 xmlns:ns="http://unicru.com/">
    <ns:Auth xmlns="http://albertsons.com//HIRETERM">
    <TransactionID>TEST_ALBERTSONS</TransactionID>
    <FormatNumber>TEST_ALBERTSONS</FormatNumber>
    </ns:Auth>
    </ns:DataExchange4>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Thanks in Advance,
    Sumit

    Hi Sumit,
    I believe this was reported and resolved for SP3. Please contact our
    outstanding support team [1] and reference CR131753.
    Regards,
    Bruce
    [1]
    http://support.bea.com
    [email protected]
    Sumit wrote:
    >
    Hi,
    I am using weblogic 8.1 SP2
    I have created a XmlObject and when I am passing it on the Webservice deployed
    on .NET environment. Root element of Input XML from WLI is getting truncated.
    When WLI generated a SOAP Body, it doesnt take RootElement. So problem seems to
    be with WLI only.
    XML :
    <JobChangeDataTransfer xmlns="http://albertsons.com//HIRETERM" >
    <TransactionID>TEST_ALBERTSONS</TransactionID>
    <FormatNumber>TEST_ALBERTSONS</FormatNumber>
    </JobChangeDataTransfer>
    SOAP Message :
    <SOAP-ENV:Envelope xmlns:SOAP-ENC="http://schemas.xmlsoap.org/soap/encoding/"
    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">
    <SOAP-ENV:Body>
    <ns:DataExchange4 xmlns:ns="http://unicru.com/">
    <ns:Auth xmlns="http://albertsons.com//HIRETERM">
    <TransactionID>TEST_ALBERTSONS</TransactionID>
    <FormatNumber>TEST_ALBERTSONS</FormatNumber>
    </ns:Auth>
    </ns:DataExchange4>
    </SOAP-ENV:Body>
    </SOAP-ENV:Envelope>
    Thanks in Advance,
    Sumit

  • (Fatal Error) Start of root element expected

    Hi,
    When running the app, I have got
    Error(1,1): <Line 1, Column 1>: XML-20108: (Fatal Error) Start of root element expected.
    I think it is due to some libraries missed inside the app. How to resolve this?
    Regards,

    did u check this file?
    C:\dp\jdev11113\Login\ViewController\public_html\mdssys\mdx\Login4.jspx.rdf
    actually these files gets created which we normally ignore.. you can remove this file.. and wrok normally without this error.. make sure that you have Login4.jspx file
    or fix this file an check if there is a xml root element like
    <?xml version="1.0" encoding="UTF-8"?>

  • XML Parsing Error: no element found Location:Line Number 1, Column 1:

    Hi,
    i have a servlet code in which i am using bouncy castle encryption algorithm , if i tried to run that servlet on embeded weblogic server than my servlet works fine without error.
    but if i deploy same Servlet code on SOA domain console than i get following error.
    XML Parsing Error: no element found
    Location: http://localhost:7001/Encryption-PGPEncrypt-context-root/pgpservlet
    Line Number 1, Column 1:
    Please help me friends...

    Hi Chandra,
    Based on my research, the error message is only generated by FireFox when the render page is blank in Internet. For some reason, .NET generates a response type of "application/xml" when it creates an empty page. Firefox parses the file as XML and finding
    no root element, spits out the error message.
    Also, based on your description, the other sites are opened correctly, the issue only happened in Central Administration(CA). This means the SharePoint services are working fine.
    Since this issue only occurred in the CA, it might be due the application pool for the CA is corrupted. Please try to restart the application pool for the CA to resove the issue:
    1. Open Internet Information Service(IIS)
    2. List the application pools
    3. Select the application pool used for the CA
    4. Stop it, and then start it again.
    Note, if the application pool is running in Classic mode, please change it to be Integrated mode.
    Additionally, I found a similar thread, which may help you too:
    http://social.msdn.microsoft.com/Forums/en/sharepoint2010general/thread/824d7dda-db03-452b-99c4-531c5c576396
    If you have any more questions, please feel free to ask.
    Thanks,
    Jin Chen
    Jin Chen - MSFT

  • "Error while parsing SOAP XML payload: no element found" received when invoking Web Service

    Running PB 12.1 Build 7000.  Using Easysoap.  Error ""Error while parsing SOAP XML payload: no element found" received when invoking Web Service".  This error does not appear to be coming from the application code.  Noticed that there were some erroneous characters showing up within the header portion of the XML ("&Quot;").  Not sure where these are coming from.  When I do a find within the PB code for ""&quot;" it gets located within two objects, whereas they both reference a "temp_xml_letter".  Not sure where or what temp_xml_letter resides???   The developer of this is no longer with us and my exposure to WSDL and Web Services is rather limited.  Need to get this resolved...please.
    This is the result of the search.  Notice the extraneous characters ("&quot;"):
    dar1main.pbl(d_as400_mq_xml)
    darlettr.pbl(d_email_xml)
    ---------- Search: Searching Target darwin for 'temp_xml'    (9:52:41 AM)
    ---------- 2 Matches Found On "temp_xml":
    dar1main.pbl(d_as400_mq_xml).d_as400_mq_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> number </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    darlettr.pbl(d_email_xml).d_email_xml:  export.xml(usetemplate="temp_xml_letter" headgroups="1" includewhitespace="0" metadatatype=0 savemetadata=0  template=(comment="" encoding="UTF-8" name="temp_xml_letter" xml="<?xml version=~"1.0~" encoding=~"UTF-16LE~" standalone=~"yes~"?><EmailServiceTransaction xmlns=~"http://xml.xxnamespace.com/Utility/Email/EmailService" ~" xmlns:imc=~"http://xml.xxnamespace.com/IMC~" xmlns:xsi=~"http://www.w3.org/2001/XMLSchema-instance~" xmlns:root=~"http://xml.xxnamespace.com/RootTypes~" xmlns:email=~"http://xml.xxnamespace.com/Utility/Email~" xsi:schemaLocation=~"http://xml.xxnamespace.com/Utility/Email/EmailService http://dev.xxnamespace.com/Utility/Email/EmailService/V10-TRX-EmailService.xsd~"><EmailServiceInformation><EmailServiceDetail __pbband=~"detail~"><ApplicationIdentifier> applicationidentifier </ApplicationIdentifier><AddresseeInformation><AddresseeDetail><Number> imcnumber </Number></AddresseeDetail></AddresseeInformation><EmailMessageInformation><Ema
    ---------- Done 2 Matches Found On "temp_xml":
    ---------- Finished Searching Target darwin for 'temp_xml'    (9:52:41 AM)

    Maybe "extraneous" is an incorrect term.  Apparantly, based upon the writeup within Wiki, the parser I am using does not interpret the "&quot;"?  How do I find which parser is being utilized and how to control it?
    <<<
    If the document is read by an XML parser that does not or cannot read external entities, then only the five built-in XML character entities (see above) can safely be used, although other entities may be used if they are declared in the internal DTD subset.
    If the document is read by an XML parser that does read external entities, then the five built-in XML character entities can safely be used. The other 248 HTML character entities can be used as long as the XHTML DTD is accessible to the parser at the time the document is read. Other entities may also be used if they are declared in the internal DTD subset.
    >>>

  • Create Root Element in XML

    Hi Experts,
    I am develpoing a program to generate xml file as output. I am using the method CL_IXML and other interfaces to generate the xml data. Here I need to create a root element. I did search in SDN but I couldnot found anything to generate xml root element.
    My output should be like this:
    <?xml version="1.0" encoding="UTF-8"?>
    <Request Version="11.1" IssuerID="1">
            <CreatePurchaseRequest
                RequestID="123456"
                Commonname="test"
            </CreatePurchaseRequest>
    </Request>
    Can anybody plz suggest how can I generate the root element Request here?
    Regards,
    Ranganadh.

    Thanks Sandra,
    My issue got resolved.
    I just created the root element using the method create_sample_element and set the attributes using set_attributes method.
    Thanks for your help.
    w_ixml = cl_ixml=>create( ).
          w_document = w_ixml->create_document( ).
          w_root = w_ixml->create_document( ).
          IF w_document IS INITIAL.
            RAISE EXCEPTION TYPE cx_cmx_da_exception
              EXPORTING
                textid = cx_cmx_da_exception=>cx_cmx_da_error_internal.
          ENDIF.
          w_encoding = w_ixml->create_encoding(
                                 character_set = 'utf-8'
                                 byte_order    = if_ixml_encoding=>co_none ).
          w_document->set_encoding( w_encoding ).
          w_element_inv1  = w_document->create_simple_element(
                      name = 'OrbiscomRequest'
                      parent = w_document ).
          w_element_inv1->set_attribute( name = 'Version'
                                         namespace = ''
                                         value = '11.1' ).
          w_element_inv1->set_attribute( name = 'IssuerID'
                                         namespace = ''
                                         value = '1' ).

  • XML Parsing Error: no element found Line Number 1, Column 1:

    Hi All,
    I have deployed EAR on my standalone server using JDEV 11.1.1.6.0. I am able to get the WSRP portlet producer page on
    http://<server>:7001/contextRoot. But when i try to click on any of the WSDL URL it gives me "XML Parsing Error: no element found Line Number 1, Column 1:"
    and from IE it gives me: XML document must have a top level element. Error processing resource
    there can be a issue with the WSRPContainer.jar file. So i have remove it from my deployment profile, EAR and lib/classpath files.
    Can you please suggest a workaround.
    Regards,
    ND
    Edited by: ND on Dec 4, 2012 9:57 PM

    Hi All,
    this error normally comes when the WLS domain is not not properly created. if you get some exception for ./provesecurity.sh file while creating the domain, then the XML error comes.
    I did not went into the depth but figured out a workaround: restart the VM/hosted box and then create the domain, remember to use diff port name while creating it from the domain creation script.
    Regards,
    ND

  • XML Parsing Error: no element found In BI Publisher

    Hi Gurus,
    I tried to get XML output for a Data Model which was based on SQL queries.
    But I got the following error in Firefox
    XML Parsing Error: no element found
    Location: http://localhost:9704/xmlpserver/servlet/xdo
    Line Number 4, Column 1:
    In IE I got an other error:
    There is no end tag for DATA_SET
    Any ideas?
    Many thanks
    Laszlo

    Hi,
    I use 11g.
    I tried to create element link when I got this error.
    Now I am using groupink.
    Without using bind variable I got result (Cartesian product)
    However if i created and used bind variable I got the same error
    this is a dept data set:
    select     "DEPARTMENTS"."DEPARTMENT_ID" as DEPTNO,
         "DEPARTMENTS"."DEPARTMENT_NAME" as "DEPARTMENT_NAME",
         "DEPARTMENTS"."LOCATION_ID" as "LOCATION_ID",
         "DEPARTMENTS"."MANAGER_ID" as "MANAGER_ID"
    from     "HR"."DEPARTMENTS" "DEPARTMENTS"
    this is the emp data set:
    select     "EMPLOYEES"."COMMISSION_PCT" as "COMMISSION_PCT",
         "EMPLOYEES"."DEPARTMENT_ID" as "DEPARTMENT_ID",
         "EMPLOYEES"."EMAIL" as "EMAIL",
         "EMPLOYEES"."EMPLOYEE_ID" as "EMPLOYEE_ID",
         "EMPLOYEES"."FIRST_NAME" as "FIRST_NAME",
         "EMPLOYEES"."HIRE_DATE" as "HIRE_DATE",
         "EMPLOYEES"."JOB_ID" as "JOB_ID",
         "EMPLOYEES"."LAST_NAME" as "LAST_NAME",
         "EMPLOYEES"."MANAGER_ID" as "MANAGER_ID"
    from     "HR"."EMPLOYEES" "EMPLOYEES"
    WHERE "EMPLOYEES"."DEPARTMENT_ID" =:DEPTNO
    Thanks for any tip!
    Laszlo

Maybe you are looking for