No end root tag

Hi - I am writing several times to my log file which I am formatting in XML, using my own XMLFormatter.
Since I log multiple times, getTail() gets called multiple times. As a result, I have
</log>(my root element) several times in my file. Would like to know if I can totally omit
the end root tag and make this a valid document when reading.
In short I want to read an XML File which does not have the closing root tag at the end of this file. Is that possible ?
Can I specify this in a dtd or stylesheet ?
*Output of my xmlfile
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2004-08-18T13:37:56</date>
  <millis>1092854276545</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>
</log>
<record>
  <date>2004-08-18T13:38:16</date>
  <millis>1092854296046</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>
</log>
<record>
  <date>2004-08-18T13:41:55</date>
  <millis>1092854515033</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>

sorry - code posted was wrong. this one has the </log> after every record. In my file, there is no </log> at all.
Here is the file posted again.
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE log SYSTEM "logger.dtd">
<log>
<record>
  <date>2004-08-18T13:37:56</date>
  <millis>1092854276545</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>
<record>
  <date>2004-08-18T13:38:16</date>
  <millis>1092854296046</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>
<record>
  <date>2004-08-18T13:41:55</date>
  <millis>1092854515033</millis>
  <sequence>5</sequence>
  <logger>ea3Audit</logger>
  <level>OFF</level>
  <class>com.ge.med.terra.eaaa.EA3Logger</class>
  <method>logAuditMessage</method>
  <thread>11</thread>
  <message>emergency login asd</message>
</record>

Similar Messages

  • Unable to Deploy WAR file  (Unknown assembly root-tag attribute: version)

    Hello,
    I created a simple web application with eclipse + tomcat plugin + struts2 (JPA Spring Hibernate ) and created the WAR file using the tomcat plugin compiler. When I deploy the war file into Tomcat 6 the file is deployed properly and i can view the website properly. But when I try to deploy the the WAR file from Oracle 9i Application Server I get the following error.
    Failed to deploy web application "mytest". Nested exception Root Cause: Error loading web-app 'mytest' at C:\ora9ias\j2ee\MySystem\applications\mytest\mytest: Unknown assembly root-tag attribute: version; nested exception is: java.lang.InstantiationException: Error loading web-app 'SFPD' at C:\ora9ias\j2ee\MySystem\applications\mytest\mytest: Unknown assembly root-tag attribute: version.
    My Current web.xml is this.
    <?xml version="1.0" ?>
    <web-app id="WebApp_9" version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee
         http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
    <display-name>My Test Project System</display-name>
    <filter>
    <filter-name>struts2</filter-name>
    <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
    </filter>
    <filter-mapping>
    <filter-name>struts2</filter-name>
    <url-pattern>/*</url-pattern>
    </filter-mapping>
    <welcome-file-list>
    <welcome-file>index.html</welcome-file>
    </welcome-file-list>
    <listener>
    <listener-class>
    org.springframework.web.context.ContextLoaderListener
    </listener-class>
    </listener>
    </web-app>
    thanks in advance,

    Thanks for the reply sasesha,
    I've changed my web.xml to
    <?xml version = '1.0' encoding = 'windows-1252'?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN"
         "http://java.sun.com/dtd/web-app_2_3.dtd">
    <web-app>     
         <display-name>My Test Project System</display-name>
         <filter>
              <filter-name>struts2</filter-name>
              <filter-class>org.apache.struts2.dispatcher.FilterDispatcher</filter-class>
         </filter>
         <filter-mapping>
              <filter-name>struts2</filter-name>
              <url-pattern>/*</url-pattern>
         </filter-mapping>
         <listener>
              <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
         </listener>
         <welcome-file-list>
              <welcome-file>index.html</welcome-file>
         </welcome-file-list>
    </web-app>
    During the initial upload the previous error doesn't show anymore, however, I'm getting this new error and currently I'm a bit at a loss since i included the spring.jar library file in my war file. I tried the new war file in Tomcat and the war file deploys fine. Am I missing a configuration or setup ?
    Failed to deploy web application "mytest". Nested exception Root Cause: Class not found: org.springframework.beans.factory.BeanDefinitionStoreException; nested exception is: java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanDefinitionStoreException. Class not found: org.springframework.beans.factory.BeanDefinitionStoreException; nested exception is: java.lang.ClassNotFoundException: org.springframework.beans.factory.BeanDefinitionStoreException
    Thanks again,
    sethsera

  • HTTP response does not contain a valid XML root tag

    I am running into an error in my trace portion of my XML when executing my application. The error is  "HTTP response does not contain a valid XML root tag". The HTTP request is successful with message 200 so it seems to be accepted by the Integration Engine. I looked for other posts on this error and only found one and it didn't show the resolution. Any help would be appreciated.

    Hello
    Check these notes (do you use a split mapping?):
    1) 1515230     XI mapping: "Root tag missing" in split mapping
    2)  1640553     XI mapping: Split mapping: error Missing_Interface
    Regards
    Mark

  • How to replace the root tag in ABAP Mapping

    how to replace the root tag with the certain string in ABAP Mapping
    just like
    <?xml version="1.0" encoding="UTF-8"?>
    <root>
         <name>Lawrence</name>
    </root>
    into
    <?xml version="1.0" encoding="UTF-8"?>
    <myRootElement>
         <name>Lawrence</name>
    </myRootElement>
    i don't want to implement it in message mapping
    please give me the sample code
    thanks in advance

    Use below code
    odocument = ixmlfactory->create_document( ).
    msgtype = odocument->create_simple_element(
    name = 'myRootElement'
    parent = odocument ).
    Thanks
    Praveen

  • Difficulty in parsing the XML root tag through Xpath.

    <?xml version="1.0" encoding="Windows-1252"?>
    <a xsi:schemaLocation="http://www.a.org.uk/ http://www.a.org.uk/schema/2.1/a_general.xsd" CreationDateTime="2013-05-17T08:49:58.7084555+10:00" ModificationDateTime="2011-05-17T08:49:58.7084555+10:00" Modification="new" FileName="a_99-570_-1-sj2.xml" RevisionNumber="3" SchemaVersion="2.1" xml:lang="en" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://www.a.org.uk/">
         <Localities>
    newyork
    </Localities>
    </a>
    I am not able to parse that xml file due to root tag . Some namespacing issue .Need a solution for that .Do we need to write external class to define all namespacing or some predefined functions can work ?
    Thanks,
    Varun Aggarwal

    But where is the namespace here !?

  • How to get the root tag name

    I have a problem: I receive several XML files in my transaction input
    <?xml version="1.0" encoding="UTF-8"?>
    <NAMES>
    </NAMES>
    <?xml version="1.0" encoding="UTF-8"?>
    <VALUES>
    </VALUES>
    and I want to obtain the root tag name (the string NAMES, VALUES, ecc.).
    I obtained this result using a XSL transformation, bui I think that the best (and easiest) way is to use an XPath command. I tried but I can not find the right command.
    Does anybody know how to do this?

    I found it:
    Transaction.Source{name(/*)}

  • How to add namespace prefix to root tag in XSL version 1.1  SOA 11g

    Hi Experts,
       Can any one post solution for adding namespace prefix to root tag using XSL version 1.1 in SOA 11g?
    I have tried the below options and none is working.
    1. Removing prefix add in exclude-prefixes in XSL.But still seeing no prefix for root tag.
    2. Added the <xsl-element>   tag with namespace.But it is not working
    3. Added the below XSL code and it is not working.
      <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
       xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
      <xsl:output method="xml" indent="yes" omit-xml-declaration="yes"/>
      <xsl:template match="@* | node()">
       <xsl:copy>
       <xsl:apply-templates select="@* | node()"/>
       </xsl:copy>
      </xsl:template>
      <xsl:template match="/*">
       <xsl:element name="ns0:{local-name()}">
       <xsl:copy-of select="namespace::*" />
       <xsl:apply-templates select="@* | node()" />
       </xsl:element>
      </xsl:template>
    </xsl:stylesheet>

    Try this:
    <xsl:stylesheet  version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
    <xsl:template match="@*|text()|comment()|processing-instruction()">
            <xsl:copy>
                <xsl:apply-templates select="@*|node()"/>
            </xsl:copy>
        </xsl:template>
        <xsl:template match="/">
            <RootTag xmlns:ns0="https://api.ladbrokes.com/v1/sportsbook-couchbase/Temp.xsd">
                <xsl:apply-templates select="@*|node()"/>          
            </RootTag >
        </xsl:template>
        <xsl:template match="*">
            <xsl:element name="{local-name()}">
                <xsl:apply-templates select="@*|node()"/>
            </xsl:element>
        </xsl:template>
    </xsl:stylesheet>

  • Only one root tag is allowed.

    I'm trying to run the following (from Flex 2.0 Online help) :
    <?xml version="1.0"?>
    <mx:Application xmlns:mx="
    http://www.adobe.com/2006/mxml">
    <mx:XML id="capitals" format="e4x">
    <Capitals label="U.S. State Capitals">
    <capital label="AL" value="Montgomery" />
    <capital label="AK" value="Juneau"/>
    <capital label="AR" value="Little Rock"/>
    <capital label="AZ" value="Phoenix"/>
    </Capitals>
    <Capitals label="Canadian Province Capitals">
    <capital label="AB" value="Edmonton" />
    <capital label="BC" value="Victoria"/>
    <capital label="MB" value="Winnipeg"/>
    <capital label="NB" value="Fredericton"/>
    </Capitals>
    </mx:XML>
    <!-- Create an XMLListCollection representing the Tree
    nodes.
    capitals.Capitals is an XMLList with both Capitals elements.
    -->
    <mx:XMLListCollection id="capitalColl"
    source="{capitals.Capitals}" />
    <!-- When you use an XML-based data provider with a tree
    you must specify
    the label field, even if it is "label".
    The XML object includes the root, so you must set
    showRoot="false".
    Remember that the Tree will not, by default, reflect dynamic
    changes
    to the XML object. -->
    <mx:Tree id="Tree1" dataProvider="{capitals}"
    labelField="@label"
    showRoot="false" width="300" />
    <!-- The XMLListCollection does not include the XML root.
    -->
    <mx:Tree id="Tree2" dataProvider="{capitalColl}"
    labelField="@label"
    width="300" />
    </mx:Application>
    and I get
    Only one root tag is allowed.
    Any idea what has to change?
    Thanks

    Like it says, that is invalid xml. It looks like it is a bug
    in the example doc.
    Add a root node to the xml and you should be ok.
    Tracy

  • Why isn't possible to have ID attribute with a root tag

    Hi ,
    Why is it not possible to have a id associated with a Root tag ??
    Thanks in advance.

    CustomClass.mxml
    <Canvas id="i_got_a_root_tag_id" >
    </Canvas>
    Now remember , the id is declared when we declare the class right so even though we don't specify the id in the Application.mxml class , it is a property of the CustomClass.
    Main.mxml
    <Application>
      <CustomClass />
      <CustomClass />
       <Script>
         public function somethingFunction():void
            i_got_a_root_tag_id.addEventListener(Do.SomethingEvent , handleEvent);
    So in the previous example , which instance gets the listener added to it ?  See how root id tags hurt everyone everywhere ?
    If this post was helpful please mark it as such.
    Sincerely ,
      Ubu

  • Error in Get Next Non-Text Sibling for XML without CR at end of tag

    Hallo all,
    I'm having a strange error parsing XML files with labview. I have an XML file in one single line, without CR at end of each tag. A normal browser or XML parsing tool is capable to read it, but not with Labview.
    The error I have is with "Get Next Non-Text Sibling.vi", which internally fails to read Type property (Error -2630, Property Node (arg 1) in NI_XML.lvlib:Get Next Non-Text Sibling.vi->XML Get Siblings Childs Nodes.vi->Encode data to label (Path).vi).
    Labview XML parser works if I add a CR at each tag/node.
    I'm quite sure this is a labview bug. A workaround I have found is to open the file, then save the file with Save File (Pretty Print) method and reopen it again, but it is time-consuming and I would like to avoid it.
    Regards,
    Daniele
    Solved!
    Go to Solution.
    Attachments:
    xmlwithnoCR.xml.txt ‏1 KB

    Which node do you pass to XML Get Siblings Child Nodes.vi ? That is also important.
    I can imagine the following scenario causing your problem: Your input node has a child node C,, but this child node has no siblings. Get Next Non-Text Sibling.vi will fail in this case. If you put a <CR> at the right position in your XML you create a text node with content <CR>. If this text node is a sibling of child C then Get Next Non-Text Sibling.vi still won't return anything but no error should occur. IMHO this is expected behavior. You can however implement your own version of Get Next Non-Text Sibling.vi. Use the Next Sibling property and check if it returns a valid refnum.

  • EOF expected after end document tag

    I'm trying to serialize java objects over a network stream using Oracle's XML Parser for java (v2.027). I was using a parser that did not buffer within a document, so was able to send multiple objects within a single document. However, I'd really like to use oracle's parser. I can't seem to turn off buffering, so sending each object as a document seems a viable alternative. Unfortunately, I can't seem to start a new document on the same stream... here's the error:
    WARN [952461810730]: ** Parsing error, line 2, uri null (in vesselworld.network.serialization.GDeserializer)
    WARN [952461810731]: <Line 2, Column 1>: XML-0100: (Error) Expected 'EOF'. (in vesselworld.network.serialization.GDeserializer)
    org.xml.sax.SAXParseException: <Line 2, Column 1>: XML-0100: (Error) Expected 'EOF'.
    at oracle.xml.parser.v2.XMLError.flushErrorHandler(XMLError.java:255)
    at oracle.xml.parser.v2.XMLError.flushErrors(XMLError.java:210)
    at oracle.xml.parser.v2.NonValidatingParser.parseDocument(NonValidatingParser.java:215)
    at oracle.xml.parser.v2.XMLParser.parse(XMLParser.java:109)
    but for the volume of objects I'm sending (interface events - mouse clicks and such), repeatedly openning and closing a stream introduces way too much overhead... Any suggestions?
    Thanks...

    It means that your XML is not properly formed, and that you're likely missing some end tag for the "link" element somewhere.  (also worth checking all your other elements to ensure they have proper end tags.

  • Appending content to an XML file in the Root tag using FileAdapter

    Hi Friends..!!
    I have got a requirement like this. There will be an XML file with List of Employees like following...
    <Employees>
    <Emp>
    <SNo>111</Sno>
    <Fname>Mahesh<Fname>
    <Lname>Babu</Lname>
    </Emp>
    <Emp>
    <SNo>222</Sno>
    <Fname>----<Fname>
    <Lname>-----</Lname>
    </Emp>
    <Emp>
    <SNo>----</Sno>
    <Fname>----<Fname>
    <Lname>----</Lname>
    </Emp>
    </Employees>
    .. So What i have to do is Appending the given Employees info to the existed XML file using File Adapter. But When i m trying to figure it out.. the given details are appended at the end of the previous content.. but i want to see all the Emp tags(the newly appended emp list also) in the existed <Employees> tag only..
    (i m also facing namespace issues here)
    Can u plz provide solution for this problem..?
    Thanks in advance.
    Regards-
    Nlion7

    Hi Nilon7,
    the given details are appended at the end of the previous contentThat will be the behaviour if you are just using file write with append...
    You will need to expand your solution into three steps, firstly a file adapter sync read to retrieve the current contents of the file, then a xslt transformation to "merge" the current data with the new data and finally a file adapter write with the merged content...
    Cheers,
    Vlad

  • I have omf video files with start and ending time tag that I like to view on iPad

    I have a large video file in the .omf (open media format).  It is sometime called Avid video editor interchange.   I heard that Quicktime has the ability to display the omf video file ??
    I am looking for a viewer for the iPad that can view the omf file with the ability to just show the starting time stamp to the ending time stamp.
    I appreciate any help.
    Thank You

    http://support.apple.com/kb/ht5209
    http://support.apple.com/kb/ht4437
    http://support.apple.com/kb/TS4215
     Cheers, Tom
    Oops!!!!!! Just realized Airplay & Apple TV requires iPad 2 (or later).
    Message was edited by: Texas Mac Man
    But there may be a way. http://www.youtube.com/watch?annotation_id=annotation_586623&feature=iv&src_vid= urjjHjJ0pdc&v=sSKQVxucnLY

  • Read XML from sockets

    I have a socket where is sent plain XML content.
    I need to correctly separate the messages I receive in the wire, and It's up to me to do it.
    assume I have something like:
    <message>
    ....content of the first message
    </message>
    <message>
    ....content of the second message
    </message>
    and so on...
    every message has his own lenght, but the root is always <>
    there is some utility in the JDK to tokenize correctly the bytes sent on the wire?
    I would need something that given a particular root tag is able to read until it gets the end root tag.

    There's nothing in the JDK that will do this for you, and the standard parsers assume that they should completely consume a stream.
    So, your best approach is going to be to write an InputStream decorator. I think the simplest approach is to insert new root tags at the start and end of the stream, parse the contents, and then extract the children of this new root. So, if your original stream looks like this:
    <message> foo </message>
    <message> bar </message>
    <message> baz </message>You would write a decorator that makes it look like this:
    <myRoot>
    <message> foo </message>
    <message> bar </message>
    <message> baz </message>
    </myRoot>There are several limitations to this approach, in particular it won't deal well with long-lived streams (unless you're using a SAX parser), or with streams that include prologue information between messages.
    A simple text-matching approach may also work, however you have to know the contents of your stream and be prepared for elements-within-elements &c.
    At the far end -- and if you don't understand it from my description it's beyond your abilities -- is to link a SAX DocumentHandler to the decorator InputStream, such that the handler will tell the stream to close itself when it sees the matching end element. You would then take the ContentHandler from the parser and use it as a SAXSource to produce the ultimate DOM objects.

  • XML Parsing of a file which keeps getting appended by another process

    Hi:
    What's the best method to parse an XML file as it's getting appended by another process. I need a functionality similar to UNIX "tail -f" where the reader waits for more input after reading is complete.
    I am getting SAXParseException because the end root tag is not yet written but the parser thinks it has finished reading the file.
    Any help will be appreciated.

    I would not use a file, a better solution would be to use a message pipeline. The (JAXM) Java API for XML Messaging, is designed to do this type of task.
    http://search.java.sun.com/ClickThru?url=http%3A%2F%2Fjava.sun.com%2Fxml%2Fjaxm%2F&qt=JAXM&pathInfo=%2Fjava&hitNum=1&col=jsun0&col=jsun1

Maybe you are looking for

  • How big of a Hard Drive can I put in?

    I was wondering how big of a HDD I can put in my iMac Early 2006 4,1?

  • Print large photo

    I have not been able to print a photo from my 8x10 paper tray. It always reverts to the photo tray which only accepts 4x6 photos. I need to be ble to print larger photos. This question was solved. View Solution.

  • Slow running after 10.8.2 update

    My MacBook Pro is running very slowly after the 10.8.2 update.  Apps take longer to launch and even from Sleep it takes several seconds before I can type in my password.  I'm not running anything unusual on my machine, just office based stuff.

  • Read spool - convert to PDF - FTP transfer

    Hi, How can I read a particular spool then convert it to PDF and transfer the PDF file to another system using FTP? Can anybody give me sample code or tutorial how to do this. thank you very much!!! james

  • Album track order

    How does one ensure that album tracks appear in their true original order and apply this throughout your whole library?