How does Weblogic 7 check for well-formed xmls

Hello,
I am having trouble deploying my applications with WLS 7.0. The error I am getting
is that my web.xml is not well-formed, but I have double-checked everything and
I think it is correct.
I have read that weblogic 7.00 does not deploy an application which xmls are not
well-formed (whereas earlier versions of weblogic would do so).
My question is: against what dtds does WLS 7 check the web.xml, the weblogic.xml
, etc.? I would think that it would check it against the dtd in the head of the
xnl file, i.e., http://java.sun.com/dtd/web-app_2_3.dtd for the web.xml, is this
correct?
If this was true, what about intranet applications that are not connected to the
Internet? could this be the reason?
TIA Cristina Ceballos

Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlString)));try/catch this ugly line, if no parse exception and a non -null doc exists then your XML is well-formed.
of course if your XML contains namespaces, you would have to setup correctly the document builder.

Similar Messages

  • Java Bean to check for Well-formed  XML DOC?

    Hi All,
    I am new to the Java XML API's. Does anyone have an example of
    a Java Bean that i can pass an XML String and check if the
    XML document is well formed?
    Thanks
    Joe

    Document doc = DocumentBuilderFactory.newInstance().newDocumentBuilder().parse(new InputSource(new StringReader(xmlString)));try/catch this ugly line, if no parse exception and a non -null doc exists then your XML is well-formed.
    of course if your XML contains namespaces, you would have to setup correctly the document builder.

  • How does APEX check for null values in Text Fields on the forms?

    Hello all,
    How does APEX check for null values in Text Fields on the forms? This might sound trivial but I have a problem with a PL/SQL Validation that I have written.
    I have one select list (P108_CLUSTER_ID) and one Text field (P108_PRIVATE_IP). I made P108_CLUSTER_ID to return null value when nothing is selected and assumed P108_PRIVATE_IP to return null value too when nothign is entered in the text field.
    All that I need is to validate if P108_PRIVATE_IP is entered when a P108_CLUSTER_ID is selected. i.e it is mandatory to enter Private IP when a cluster is seelcted and following is my Pl/SQL code
    Declare
    v_valid boolean;
    Begin
    IF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := TRUE;
    ELSIF :P108_CLUSTER_ID is NOT NULL and :P108_PRIVATE_IP is NULL THEN
    v_valid := FALSE;
    ELSIF :P108_CLUSTER_ID is NULL and :P108_PRIVATE_IP is NOT NULL THEN
    v_valid := FALSE;
    END IF;
    return v_valid;
    END;
    My problem is it is returning FALSE for all the cases.It works fine in SQL Command though..When I tried to Debug and use Firebug, I found that Text fields are not stored a null by default but as empty strings "" . Now I tried modifying my PL/SQL to check Private_IP against an empty string. But doesn't help. Can someone please tell me how I need to proceed.
    Thanks

    See SQL report for LIKE SEARCH I have just explained how Select list return value works..
    Cheers,
    Hari

  • How does one check for Updates...

    How does one check for Updates when :
    Registration
    Deactivation
    Updates
    Menu items are greyed out! ?

    Actually, it's a timing issue. Those items are greyed out for a couple of minutes after PPro starts. A little patience and they become available. ;)
    Cheers
    Eddie
    PremiereProPedia   (
    RSS feed)
    - Over 300 frequently answered questions
    - Over 250 free tutorials
    - Maintained by editors like
    you
    Forum FAQ

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

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

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

  • How does one check for view changes to avoid unnecessary reprovision?

    I have a couple of ActiveSync resources that I setup custom userforms and workflows for to sync up only a couple of attributes from each one. With ActiveSync whenever a user account is modified it processes the modified account no matter which attributes were actually modified. For example, if I want to sync the email attribute from an Active Directory resource the ActiveSync workflow receives modification events for all changes to Active Directory accounts, not just email. With my simple workflow what often happens is that I reprovision the accounts even when no changes are made. The downside of this is that the Lighthouse account is marked as being modifed by the ActiveSync proxy user even though no real changes were made and extraneous server tasks are generated that have no results.
    In my workflow I would like to somehow predetermine if the reprovision will actually make changes and if not cancel the workflow. Is there some utility class that I can use to check for modifications or some option I can pass into the reprovision workflow to accomplish this? I probably could check the user.update.accounts[resource].changes before calling reprovision but that would seem to require a lot of express coding and comparisons.

    I don't have an answer for you but I do have a question. I have been researching the issue of which channels in the 2.4 band are permitted according to law in the various countries in Europe. We have offices in Germany, France, Spain, Netherlands and England and I was wondering which channels we are permitted to use. Do you know or could you point me to a document I could read?

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

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

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

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

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

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

  • How can I check for the existence of an XML file in Illustrator Javascript??

    I'm writing a Javascript to run at startup. I want to check for the existence of XML files and process them, if they are available. How can I check for their existence?

    Your first line just sets a variable to a string value… getFiles() is a method of Folder… so
    var InputXMLDir = Folder( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/" );
    Not a PC user so I can't remember if the colon is OK…? As you appear to know the file name why bother with a folder get files anyhow you could just check if the file exists then do some thing…
    alert( File( "D:/Brackets/Create_Bracket_Graphics/Input/XML-n-Templates/brackets_men_web.xml" ).exists );

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

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

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

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

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

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

  • Not well-formed XML

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

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

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

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

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

  • Carriage return in textarea - how do I check for and remove it???

    I have an html form that has a <textarea> element for user input. I work mainly with Java and some JavaScript. Since carriage returns are permitted in a <textarea> element, upon retrieving the value submitted, my Java and/or JavaScript variables contain carriage returns as well, making the values incomplete.
    For Example :
    String dataSubmitted = request.getParameter("formInput");
    <script language="JavaScript">
    var textValue = "<%=dataSubmitted%>";
    ....//do other stuff
    </script>When I view the source of my JSP page, the above statement of code looks like this:
    var textValue = "This is some text that
    I submitted with a carriage return";I'm putting the text submitted through this form into a mysql database, and when I pull up the values I find that it has recorded the carriage return as well. There is an actual symbol representing a carriage return in the db field.
    What I'd like to do is use some Java code to go through each character of the String and find and remove the carriage return, perhaps replacing it with an empty space instead. But how do I check for a carriage return in a String variable?
    Also, is there a way to use JavaScript to alert the user when the carriage return button is pressed when they're in the <textarea>?
    Any input is appreciated,
    Thank You,
    -Love2Java

    What I'd like to do is use some Java code to go through
    each character of the String and find and remove the
    carriage return, perhaps replacing it with an empty
    space instead. But how do I check for a carriage return
    in a String variable?The carriage return is represented by the \r. Generally there is also a newline, the \n. You can use String#replaceAll() to replace occurences of them by a space.
    string = string.replaceAll("\r\n", " ");
    Also, is there a way to use JavaScript to alert the user
    when the carriage return button is pressed when they're
    in the <textarea>?You can capture keys using the 'onkeypress' attribute. The keyCode of a the return key is 13. So simply catch that:<textarea onkeypress="if (event.keyCode == 13) alert('You pressed the return button.'); return false;"></textarea>The return false prohibits the linebreak being inserted. If you remove that, then it will be inserted anyway.

  • Not well formed  XML data in XI

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

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

Maybe you are looking for

  • Cost of Goods Sold Calculations

    I have a planning folder where the user first enters a company code, a currency and a profit center into the respective variables.  In the subsequent template user enters material SKU along with planned Sales Quantity and planned Average Selling Pric

  • What's your flavor?

    Hello, I would like to open this thread regarding customization and how we get the best out of our computers for everyday use. What themes for windows 7 do you use? What programs? Wallpapers? Can we share with each other opinions and suggestions? I c

  • HOw Do I untrash my trash

    So I made a folder for a group of documents I need for a class im taking on the desktop then put it on the doc so I could get to it fast, but after putting in a mass of documents I saw it still on the desk top and threw it in the trash as I like to k

  • Blackberry user ID

    I have a problem with my blackberry ID. I know my username and password are correct , but when I downloaded the new bbm that required the blackberry id information, everytime I type the correct information a message appears saying (Please enter the u

  • Wily introscope 8.2.2 : unable to start due to JVM error

    Hi, I'm installing Wily introscope 8.2.2 for my Netweaver Solution Manager 7.01, on server Window 2008 x64. I followed installation guide and I encountered a first "license error" to start Enterprise Manager that I resolved by installing SAP Manageme