Saving an XML document

Hi,
I am using DOM to load and process XML document. But I do not know how to save the changes back to the xml file in disk.
Can it be done with JAXP.
Do I have to save the whole dom at once to a output stream or can I save only the updates I made in DOM to the xml file.
Thanks a lot,
Chamal.

http://java.sun.com/developer/onlineTraining/J2EE/Intro2/xml/xml.html#Create_DOM
hth

Similar Messages

  • Newbie question related to structured document saving to XML

    I am Framemaker newbie working on existing Help File documents. I figured out how to updated different modules and steps but having problems adding new module headings as when it is saved to XML the anchoring, not sure if that is the correct term, is off by one. And I can no find where or how to update the anchors. I am using 7.0 with XP Pro. Thanks

    Russ - thanks for the reply and apologize for not providing more details. I have a Help File document written in Framemaker. I have had no training on Framemaker but given the task of updating the file. The Help File contains numerous Module Headings that have anchors. When the Help File is used witihin our application - if a user clicks help, it automatically opens to that section of the help file that the user is currently in. I need to add a new module heading, so I tired copying and pasting an existing part of the document and modified but that somehow thru off the anchors when if exports to xml. I hope this make sense as I am just learning the tool myself. Thanks

  • Saving a styled document to XML file

    Hi,
    I am trying to save a styled document to an XML file, and I don't know how. I can easily save the text with writer.writeCharacters(string), where writer is an XMLStreamWriter. But how to save any style information?
    If I use XMLEncode do just dump out the document, how do I write the startElements, endElements, etc? Can I have two streams to the same file?
    Or is there a way to save the styling information separately from the text (attributes?) so that it automatically matches up when both text and styles are read back in?
    HEre is the code I currently use:
       // write cards.
                    final JFileChooser fc = new JFileChooser();
                  int returnVal = fc.showSaveDialog(null);
                    if (returnVal == JFileChooser.APPROVE_OPTION) {
                     File saveFile = fc.getSelectedFile();
                     XMLOutputFactory outputFactory = XMLOutputFactory.newInstance();
                     try
                         FileWriter fileWriter=new FileWriter(saveFile);
                         XMLStreamWriter writer = outputFactory.createXMLStreamWriter(fileWriter);
                         writer.writeStartDocument("1.0");
                         writer.writeStartElement("Deck");
                       FlashCard onecard;
                  for (int i=0; i < current.cards.size(); i++)
                           onecard=(FlashCard)current.cards.get(i); 
                           writer.writeStartElement("Card");
                           writer.writeStartElement("front");
                          writer.writeCharacters (onecard.front );
                          writer.writeEndElement();
                          writer.writeStartElement("back");
                          writer.writeCharacters (onecard.back );
                          writer.writeEndElement();
                          writer.writeEndElement();
                       writer.writeEndElement();
                       writer.flush();
                       writer.close();
                        current.nameDeck=saveFile.getName();
                      } This is in a flashcard program and I use XML to separate the different cards and the fronts and backs of each card.
    Marlon

    Here's what I did for that: the StyledDocument is a tree structure, so I traversed that structure recursively and built an XML document with the same structure, using SAX events.Element e = textPane.getDocument().getDefaultRootElement();
    SAXTransformerFactory tf = (SAXTransformerFactory)SAXTransformerFactory.newInstance();
    TransformerHandler handler = tf.newTransformerHandler();
    Transformer t = handler.getTransformer();
    t.setOutputProperty(javax.xml.transform.OutputKeys.ENCODING, "UTF-16");
    StringWriter sw = new StringWriter();
    handler.setResult(new StreamResult(sw));
    handler.startDocument();
    dumpElement(e, handler);
    handler.endDocument();And here's the dumpElement method that does the recursive business:private void dumpElement(Element e, ContentHandler ch) {
      try {
        AttributeSet as = e.getAttributes();
        AttributesImpl a = new AttributesImpl();
        Enumeration ase = as.getAttributeNames();
        while (ase.hasMoreElements()) {
          Object name = ase.nextElement();
          Object value = as.getAttribute(name);
          a.addAttribute("", "", name.toString(), "string", value.toString());
        ch.startElement("", "", "Element", a);
        int ec = e.getElementCount();
        if (ec == 0) {
          int start = e.getStartOffset();
          int len = e.getEndOffset() - start;
          if (start < textPane.getDocument().getLength()) {
            a = new AttributesImpl();
            a.addAttribute("", "", "Offset", "string", Integer.toString(start));
            try {
              ch.startElement("", "", "Text", a);
              String text = textPane.getDocument().getText(start, len);
              char[] textChars = new char[text.length()];
              text.getChars(0, text.length(), textChars, 0);
              ch.characters(textChars, 0, text.length());
              ch.endElement("", "", "Text");
            } catch(BadLocationException ble) {
        } else {
          for (int i=0; i<ec; i++) {
            dumpElement(e.getElement(i), ch);
        ch.endElement("", "", "Element");
      } catch(SAXException saxe) {
        saxe.printStackTrace();
    }You can adapt this to suit your requirements.

  • How to save sections of a single XML Document to multiple tables ?

    Firstly, I apologise for the long e-mail but I feel it's necessary in order to clarify my problem/question.
    The XML document representation below stores information about a particular database. From the information in the XML document you can tell that there is a single database called "tst" which contains a single table called "tst_table". This table in turn has two columns called "CompanyName" & "Country".
    I want to use Oracle's XML SQL Utility to store this information into three seperate database tables. Specifically, I want to store the information pertaining to the database (i.e. name etc.) in one table, the information pertaining to the table (name, no. of columns etc.) in another and the information pertaining to the columns (name, type etc.) in yet another table.
    I have seen samples where an entire XML Document is saved to a database table but I cannot find any examples where different sections of a single XML Document are saved into different database tables using the XML SQL Utility.
    Can you please tell me the best approach to take in order to accomplish this . Does it involve creating an XMLDocument and then extracting the relevant sections as XMLDocumentFragment's, retrieving the String representations of these XMLDocumentFragment's and passing these strings to the OracleXMLSave.insertXml() method.
    Is this the best approach to take or are there any other, perhaps more efficient or elegant, ways of doing this ?
    Thanks in advance for your help
    - Garry
    <DATABASE id="1" name="tst">
    <TABLES>
    <TABLE name="tst_table">
    <NAME>Customers</NAME>
    <COLUMNS>
    <COLUMN num="1"> <COLID>2</COLID>
    <COLNAME>CompanyName</COLNAME>
    <COLTYPE>Text</COLTYPE>
    </COLUMN>
    <COLUMN num="2">
    <COLID>3</COLID>
    <COLNAME>Country</COLNAME>
    <COLTYPE>Text</COLTYPE>
    </COLUMN>
    </COLUMNS>
    </TABLE>
    </TABLES>
    </DATABASE>
    null

    See this thread;
    {thread:id=2180799}
    Jeff

  • Creating an xml document from filenames of selected files

    Hey guys, I am totally new to automator and applescript so please be kind!
    I have an xml/flash image portfolio website which has image galleries. Each gallery has an xml document which specifies a thumbnail and full size photo to be displayed in the gallery. If I want to make a new gallery I have to make a new xml document and enter all the filenames of the images I want to display in the gallery. ( I guess you can see where this is going).
    This is fine if I have 10 images in the gallery but if I want to make a gallery with 350 images in then it could get pretty tedious.
    What I would love to be able to do is select a group of images and then have a script or automator action that can copy the files names and create a new gallery xml document containing the relevant code with all the files names. Ideally then saving the gallery with a sequential filename.
    Tying this into the new contextual services menu in snow leopard would really make the task incredibly easy.
    Is this possible? I'm not scared of learning how to do this therefore some pointers in the right direction would be great.
    Thanks,
    Chris

    Thanks Camalot,
    I was just thinking of selecting images from the finder but if this could be integrated into Aperture's export dialog that would be even better.
    this is the xml:
    <?xml version="1.0" encoding="utf-8"?>
    <gallery thumbwidth="220" thumbheight="138" columns="3" gap="4">
    <item>
    <ID>1</ID>
    <title><![CDATA[Title 1]]></title>
    <desc><![CDATA[This is description 1. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/7.jpg</thumb>
    <image>images/big/7.jpg</image>
    </item>
    <item>
    <ID>2</ID>
    <thumb>images/thumbs/8.jpg</thumb>
    <image>images/big/8.jpg</image>
    </item>
    <item>
    <ID>3</ID>
    <title><![CDATA[Title 3]]></title>
    <desc><![CDATA[This is description 3. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
    <thumb>images/thumbs/9.jpg</thumb>
    <image>images/big/9.jpg</image>
    </item>
    </gallery>

  • XML document question?

    Is an XML document only "information" on a song and not the song itself? I burned my "iTunes Music Library" to a CD thinking I saved all my songs. Can it be transformed into a usable file or did I just save "info"? Can anyone help a PC 1st grader?
    inspiron 8600   Windows XP  

    The XML file is only data about the songs on the Playlist or Library. You can open the file with one of several programs and view it for yourself.
    See: What are the iTunes Library files?
    There are no song files contained in the XML file. Only music metadata.

  • How to validate generated XML-Document in Memory by XML-Schema?

    Hi all!
    I have the following problem:
    I am generating a Document using the DOM delivered with Xerces 2.6.2.
    Before I'll send the generated xml-document through network to another system I have to check with my xml-schema if the document is correct.
    In the DOM-FAQ I found an "example" trying to explain how it should work. But with this example the problems begin.
    I am creating my document with this method:
         public void createDocument() {
              myDOM = DOMImplementationImpl.getDOMImplementation();
              doc = myDOM.createDocument("", "documentData", null);
              root = doc.getDocumentElement();
              root.setAttribute(
                   "xmlns:xsi",
                   "http://www.w3.org/2001/XMLSchema-instance");
              //          root.setAttribute("xsi:noNamespaceSchemaLocation", "myScheme.xsd");
              domConfig = ((DocumentImpl) doc).getDomConfig();
              domConfig.setParameter(
                   "schema-location",
                   "file:///d:/workspace/XMLProject/WebContent/WEB-INF/myScheme.xsd");
              domConfig.setParameter("error-handler", new EHandler());
              domConfig.setParameter("validate", Boolean.TRUE);
         }In the line getting the domConfig, it is getting differeing to the example: The example is like this:
    import org.w3c.dom.Document;
    import org.w3c.dom.DOMConfiguration;
    import org.w3c.dom.ls.LSParser;
    Document document = builder.parseURI("data/personal-schema.xml");
    DOMConfiguration config = document.getConfig();
    config.setParameter("error-handler",new MyErrorHandler());
    config.setParameter("validate", Boolean.TRUE);
    document.normalizeDocument();They get the DOM-Configuration from the document-Object, but my document-Object has no "getConfig()" and only after type-casting I get a getDomConfig()-Method to get the configuration.
    Then I fill my document and call                
    ((DocumentImpl) doc).normalizeDocument();When I run my Application I get the following error:
    org.w3c.dom.DOMException: FEATURE_NOT_SUPPORTED: The parameter schema-location is recognized but the requested value cannot be set.
         at org.apache.xerces.dom.DOMConfigurationImpl.setParameter(Unknown Source)
         at xmlProject.createDocument(Convert.java:63)
         at xmlProject.Convert.main(Convert.java:154)I tried several ways to get the validation without success.
    The next question is how I should refer to my xml-schema (which path) and where to place it relative to my jar I will generate, because I will have no webserver I could place it on.
    Has anyone any experience with validating a document created and not placed on disc?
    I have also another question to SAX: I read, that it is reading a document without saving it in the memory. I think this means that if I am validating it by SAX it will be read once and for parsing it will be read a second time. If I would transfer the document over an tcp-connection, I only have the document once in my inputstream and after validation it would be consumed I think. But what can I parse then? Or did I missed a detail with the function of the SAX?
    Thank you for your help!
    Yours
    Christian

    static final String schemaSource = argv[0];
    static final String JAXP_SCHEMA_SOURCE =
    "http://java.sun.com/xml/jaxp/properties/schemaSource";
    DocumentBuilderFactory factory =
    DocumentBuilderFactory.newInstance();
    factory.setAttribute(JAXP_SCHEMA_SOURCE,
    new File(schemaSource));

  • ? is shown for Norwegian characters when XML document is parsed using DOM

    Hi,
    I've a sample program that creates a XML document with a single element book having Norwegian characters. Encoding is UTF-8. When i parse the XML document and try to access the value of that element then ? are shown for Norwegian characters. XML document file name is "Sample.xml"
                DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
                Document doc = docBuilder.newDocument();
                Element root = doc.createElement("root");
                root.setAttribute("value", "Á á &#260; &#261; ä É é &#280;");
                doc.appendChild(root);
                TransformerFactory transfac = TransformerFactory.newInstance();
                Transformer trans = transfac.newTransformer();
                trans.setOutputProperty(OutputKeys.OMIT_XML_DECLARATION, "yes");
                trans.setOutputProperty(OutputKeys.INDENT, "yes");
                trans.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
                //create string from xml tree
                java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
                StreamResult result = new StreamResult(baos);
                DOMSource source = new DOMSource(doc);
                trans.transform(source, result);
                writeToFile("Sample.xml", baos.toByteArray());
                InputSource is = new InputSource(new java.io.ByteArrayInputStream(readFile("Sample.xml")));
                is.setEncoding("UTF-8");
                DocumentBuilder obj_db = DocumentBuilderFactory.newInstance().newDocumentBuilder();
                Document obj_doc = obj_db.parse(is);
                obj_doc.normalize();
                System.out.println("Value is : " + new String(((Element) obj_doc.getElementsByTagName("root").item(0)).getAttribute("value").getBytes()));writeFile() - Writes the document bytes in Sample.xml file
    readFile() - Reads the Sample.xml file
    When i run this program XML editor shows the characters correctly but Java code output is: Á á ? ? ä É é ?
    What's the problematic area in my java code. I didn't get any help from any source. Please suggest me the solution of this problem.
    Thanx in advance.

    Hi,
    I'm using JBuilder 2005 and i mentioned encoding UTF-8 for saving Java source files and also for compilation. I've modified my source code also. But the problem persists. After applying changing the dumped sample.xml file doesn't display these characters correctly in IE, but earlier it was displaying it correctly at IE.
    Modified code is:
    DocumentBuilderFactory dbfac = DocumentBuilderFactory.newInstance();
                DocumentBuilder docBuilder = dbfac.newDocumentBuilder();
                Document doc = docBuilder.newDocument();
                Element root = doc.createElement("root");
                root.setAttribute("value", "Á á &#260; &#261; ä É é &#280;");
                doc.appendChild(root);
                OutputFormat output = new OutputFormat(doc, "UTF-8", true);
                java.io.ByteArrayOutputStream baos = new java.io.ByteArrayOutputStream();
                OutputStreamWriter osw = new OutputStreamWriter(baos, "UTF-8");
                XMLSerializer s = new XMLSerializer(osw, output);
                s.asDOMSerializer();
                s.serialize(doc);
                writeToFile("Sample5.xml", baos.toByteArray());
                InputSource o = new InputSource(new java.io.ByteArrayInputStream(readFile("Sample5.xml")));
                o.setEncoding("UTF-8");
                com.sun.org.apache.xerces.internal.parsers.DOMParser obj_parser = new com.sun.org.apache.xerces.internal.parsers.DOMParser();
                obj_parser.parse(o);
                Document obj_doc = obj_parser.getDocument();
                System.out.println("Value : " + new String(((Element) obj_doc.getElementsByTagName("root").item(0)).getAttribute("value").getBytes()));I'm hanged on this issue. Can u please provide me the code snippet that works with these characters or suggest solution.
    Thanx

  • Question Marks and Missing pieces in XML documents

    Hi there,
    I am using FM 10.  I have set up a conversion table to apply DITA structure to documents, with the intent of saving them as XML docs.  Unfortunately, after I do this, the XML docs are coming out a little strange...with ? added, with text and tables missing, etc.
    Here is what the structure looks like before I save as XML:
    Then, I save as XML, reopen in FM and get the following:
    I can look at the XML directly and see that the culprit is a little box character that must not be interpreted correctly when FM reopens the XML doc:
    All I don't understand is why that character is appearing in the XML to begin with.  I don't have anything - even a space - in the structured doc in that location. Any ideas as to why this is occuring?  This isn't a huge deal in the example XML file, but other XML files I've saved via this process are littered with ? or sometimes altogether missing entire elements (like the whole Title element has disappeared).
    Hannah

    Hannah,
    Such characters can be the result of pasting text from application with CR+LF line-ends. FrameMaker internally uses only the LF character and so spurious CR can be left over.
    To test if this is the case, you can
    • search in your original documents for \x0d  (backslash, x, zero, d: the hex code for Carriage Return) and if found replace them with nothing.
    • or, do a MIF wash before saving as XML: Save the document as MIF, then open this MIF document and proceed as you originally intended.
    But maybe it is something different,
    - Michael

  • Reading a large file?  I created an Applescript to read an XML document...

    I created an Applescript to read an XML document that had been exported from Final Cut Pro but it has trouble reading anything larger than a 1mb. Even 500kb takes a long time.
    My code is most likely very ineffecient, but I have little experience with Applescript. The script reads an XML document one line at a time then breaks down each line into it's componenents and literally reads each character looking for "<name>" then it checks to see if "<reel>" came before it. It then records the name in between "<name>" and "</name>." Then I get my list of tapes that are in the Final Cut Pro project. Does anyone have any advice on how to improve this code?
    property type_list : {"TEXT", "XML"}
    property extension_list : {"TXT", "XML"}
    on open these_items
    tell application "Finder"
    set my_file to these_items as string
    set file_ref to (open for access my_file) read
    close access file my_file
    set AppleScript's text item delimiters to ASCII character 10
    set new_list to every text item of file_ref
    set lengthofarray to length of new_list
    set h to 1
    set shotcount to 0
    set finalShots to {"You have ", "", " shots in your project."}
    set finalListoftapes to {"Your list of tapes are:", ""}
    repeat lengthofarray times
    set i to 1
    set x to 1
    set switch to 0
    set z to {""}
    set reelName to {"", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", ""}
    set letter_list to item h of new_list
    set AppleScript's text item delimiters to ""
    set final_list to every text item of letter_list
    set lengthofletter_list to length of final_list
    repeat lengthofletter_list times
    if item i of final_list is "<"a" then
    if item (i + 3) of final_list is "m" then
    set letter_list2 to item (h - 1) of new_list
    set final_list2 to every text item of letter_list2
    set lengthofletter_list2 to length of final_list2
    set j to 1
    repeat lengthofletter_list2 times
    if item j of final_list2 is "<" then
    if item (j + 1) of final_list2 is "r" then
    if item (j + 2) of final_list2 is "e" then
    set x to (i + 6)
    set y to 1
    repeat while item 1 of z is not "<"
    set item y of reelName to item x of final_list
    set x to (x + 1)
    set y to (y + 1)
    set item 1 of z to item x of final_list as string
    end repeat
    if item 1 of reelName is not "" then
    set displayText to reelName as string
    set lengthofListoftapes to length of finalListoftapes
    set shotcount to (shotcount + 1)
    set k to 1
    repeat lengthofListoftapes times
    if item k of finalListoftapes is equal to displayText then
    set switch to 1
    end if
    set k to (k + 1)
    end repeat
    if switch is 0 then
    set finalListoftapes to (finalListoftapes & displayText)
    set check to finalListoftapes as string
    end if
    set switch to 0
    end if
    end if
    end if
    end if
    set j to (j + 1)
    end repeat
    end if
    end if
    end if
    end if
    set i to (i + 1)
    end repeat
    set h to (h + 1)
    end repeat
    set item 2 of finalShots to shotcount
    set finalShots to finalShots as string
    set AppleScript's text item delimiters to ASCII character 10
    set finalListoftapes to finalListoftapes as string
    set finalListoftapes to finalShots & (ASCII character 10) & (ASCII character 10) & finalListoftapes & (ASCII character 10) & (ASCII character 10) & "This list of tapes has been saved on your desktop."
    set path_list to these_items as string
    set filepath to path_list & "_listoffiles.txt"
    set outputFile to (open for access file filepath with write permission)
    write finalListoftapes to outputFile
    close access outputFile
    display dialog finalListoftapes
    end tell
    end open

    Try changing your approach - don't read it into an array, process it one line at a time. Obviously any approach where you have the whole file in memory is going to exceed memory at some size of the file.

  • Multiple namespaces in an XML document

    I have an XML document that I am trying to use within a data flow (XML Source)--the problem is that I keep getting an error message stating that the XML document has multiple namespaces and therefore, SSIS will not create the XSD for me.  If I take out the second namespace, I am able to successfully get the task to execute, but this XML is created with 2 namespaces and there is no way to get around this (I cannot get the report server to change these parameters)--my question is: does anyone know of a way to get SSIS to handle multiple namespaces so that I can process this XML document and extract the necessary data elements from it.
    Any assistance would be greatly appreciated.
    Thank you!!!!

    I am replying too much late..........thinking might be useful for someone !!!!
    SSIS does not handle multiple namespaces in the XML source file. You can find examples where you see the format
    <Namespace:Element>.
    The first step to avoid multiple namespaces is to transform your source file to a format that doesn’t refer to the namespaces.
    SSIS has an XML task that can do the transformation. Add the XML task to an SSIS Control Flow and edit it.
    Change the OperationType property value to XSLT, the SourceType to File connection and the Source to your source file that has the problem.
    Set the SaveOperationResult property to True.
    Expand the OperationResult branch and Set DestinationType to File Connection and the Destination to a new XML file.
    Add the following to a new file and save it with an xslt file extension.
    <?xml version="1.0" encoding="utf-8" ?> 
    <xsl:stylesheet version="1.0"         xmlns:xsl="http://www.w3.org/1999/XSL/Transform"> 
      <xsl:output method="xml" indent="no" /> 
      <xsl:template match="/|comment()|processing-instruction()"> 
        <xsl:copy> 
          <xsl:apply-templates /> 
        </xsl:copy> 
      </xsl:template> 
      <xsl:template match="*"> 
        <xsl:element name="{local-name()}"> 
          <xsl:apply-templates select="@*|node()" /> 
        </xsl:element> 
      </xsl:template> 
      <xsl:template match="@*"> 
        <xsl:attribute name="{local-name()}"> 
          <xsl:value-of select="." /> 
        </xsl:attribute> 
      </xsl:template> 
    </xsl:stylesheet> 
    Back in the XML task, set the SecondOperandType to File connection and the Second Operand to your new XSLT file.
    When you run the XML task, it will take your original file and apply the transformation rules defined in the XSLT file. The results will be saved in your new XML file.
    This task only needs to be run once for the original XML file. When you look at the new file, you’ll see the same data as in the original, but without namespace references.
    Now you can return to your data flow and alter the XML Source to reference the new XML file.
    Click on the Generate XSD and you should be able to avoid your error.
    When you click on the Columns tab in your XML Source, you will probably see a warning. This is because the data types may not be fully defined (for example there’s no mention of string lengths). This shouldn’t be a problem as long as the default data type
    (255-character Unicode string) meets your needs.
    =================life is beatiful..so !!===========
           Rahul Vairagi
    =================================== Rahul Vairagi =================================== My Blogs: www.sqlserver2005forum.blogspot.com www.knwhub.blogspot.com

  • (un-)marshalling incomplete XML documents ?

    Hi,
    just wondering how XMLBeans deals with this issue, both in the specs and in the
    current implementation. Is it possible to parse an XML document in which required
    elements are missing, e.g. because some work in progress had been saved as XML?
    I haven't worked with XMLBeans, but am curious if it goes beyond of what JAXB
    offers here.
    Please have a look at the respective discussion thread on the comp.text.xml newsgroup
    (http://tinyurl.com/lhm8).
    Heiko

    "Heiko Sommer" <[email protected]> wrote:
    current implementation. Is it possible to parse an XML document in which
    required
    elements are missing, e.g. because some work in progress had been saved
    as XML?
    I haven't worked with XMLBeans, but am curious if it goes beyond of what
    JAXB
    offers here.
    Please have a look at the respective discussion thread on the comp.text.xml
    newsgroup
    (http://tinyurl.com/lhm8).
    Yes, absolutely.
    This is one of the key strong points of XMLBeans. Both in spec and
    implementation, it is designed to (and does) bind to both valid and
    invalid data correctly. It does so according to simple and robust
    rules.
    If you have a document where the data would be accessible via a
    simple xpath /a/b/c/d, then with XML Beans the data is always
    accessible via the bound getters doc.getA().getB().getC().getD(),
    even if the document is structurally invalid (e.g., extra or missing
    elements).
    So XMLBeans's design guarantees the ability to bind to invalid data.
    This makes for both faster, more understandable, and more robust
    binding than other approaches that may require validity according to
    a complex content model in order to bind.
    XMLBeans is also capable of validating your data (complex content
    models, etc - 100% of the spec) - but it is an important part of the
    tool that your data does not need to be valid in order to be
    bound. Binding only requires use of the proper tag names.
    This model also makes for excellent loose-coupling and versioning
    behavior, as was asked on a recent Q in this newsgroup:
    http://tinyurl.com/mqov
    David

  • Issues opening excel saved as xml with reports builder 10.1.2.0.2

    Hi
    I saved excel as xml and when I try to open it using Oracel Reports, I get the following error:
    REP-6106: Error in XML report definition at line 2 in .....\...\Book1.xml
    This is what is there in line 2:
    Workbook xmlns="urn:schemas-microsoft-com:office:spreadsheet"
    Has anyone had similar issues in opening excel saved as xml?
    Any help?
    Thx!

    Hi
    Thanks for the response. The document is good for issues with jsp reports. I am not even able to save this one as jsp till now. Not sure if there is some other way to do it.
    This is what I did:
    1. Create an excel template with 2 worksheets.
    2. Save as xml.
    3. Try to open with reports builder.
    Thats when I get the error.
    Not sure if my version problem or I am missing out on some step.
    Thx!

  • Why is oracle limited appropriate to save any kind of xml documents

    hey,
    currently i´m student of health informatics in dortmund (germany)
    our next test is about oracle database.
    i do now know a lot about it.
    but there is one open question and noone can give me an answare...
    why is oracle limited appropriate to save any kind of xml documents?
    the only thing i know is that you can save xml documents native als xmltype or you can use
    xml repository...
    but ??? please help me, i think for you its just a question like hows the weather...
    thank you very much.
    greetings from germany,
    mathias
    Edited by: user8643284 on 19.07.2009 06:20

    XML documents may be saved in Oracle database with the XDK or XML documents may be stored in Oracle XML DB.
    For storing an XML document in Oracle database with the XML SQL Utility pease refer
    http://www.devx.com/xml/Article/32046
    For storing an XML document in Oracle XML DB please refer
    http://download.oracle.com/docs/cd/B19306_01/appdev.102/b14259/xdb03usg.htm

  • Cannot view the content of XML document.

    Hi experts,
    i have saved edit form (SAP Demo News) in document folder (KM Content > document). To view the content, I click the XML document then the content is display as design in ShowForm.
    My problem is i save the edit form (SAP Demo News) in my own folder (KM Content > MyFolder), then when I click the XML document the content is NOT display as design in ShowForm. But its display as XML coding.
    How to make the content of XML document NOT view as XML coding?
    Thanks and regards
    faeza

    Hi faeza ,
    by default XML Forms can only be used in the repositories documents and userhome.
    If you want to use XML-Forms in your own repository like "MyFolder" than the behaviour is like you have described.
    So you have to adjust the KM settings for using XML-Forms as well in the repository "MyFolder".
    Goto
    System Administration ->
    System Configuration ->
    Knowledge Management ->
    Content Management ->
    Configuration
    -> Content Management
    ->  Repository Filters
    -> XML Forms Repository Filter
    Choose the XML Forms Repository Filter entry "xmlforms_filter" and choose Edit.
    Add as "Repositories:" your repository "MyFolder".
    Save it and restart the whole portal.
    Best regards
    Frank

Maybe you are looking for

  • Popup on navigation

    hi i have the taskflow which got view when i navigate to next view.screen i what it to appear as popup how can i do that am in jdeveloper 11.1.1.6

  • Help! I have lost all my iTunes info!

    I have recently purchased a new computer with Windows 7 installed on it. When I logged into iTunes, none of the previous music I had downloaded, or was on there, is on iTunes anymore. I thought I would just be able to log into my account, and my song

  • Can anyone help me? Problems with external mixer?

    Hey all, First off i would like to say hey to everyone as i am new so i hope someone out there can help me and me likewise in the future. Onto my problem. I recently bought an Alesis Multimix 8 USB and i am having a few problems with my iBook recievi

  • Problems creating free PDF

    I uploaded 2 Word 2002 files my Acrobat.com account. I have tried several times to convert them to PDF and I keep getting this in the lower left corner: The file could not be converted to PDF.:PDF conversion failed. Please try again later. Am I doing

  • How To Cut & Paste From Second Video?

    I have two videos.  They're almost identical except for one scene. I've been trying to copy that scene from the first video and paste it into the second.  It would replace the scene in there now exactly.  Both are the same length. I haven't had any s