Create an XML Document with HTML Entities?

I'm writing a program that uses SAX to parse an XML document and generate XHTML from it, but I would like the XML document to allow HTML entities, of course, in the XML markup.
Each time my parser gets to any entity at all it dies reporting an undefined entity.
Is there any way I can refer to the HTML entity DTD or perhaps, in my own DTD, copy and paste the HTML entities? How would I make a reference like this in my XML document?
Thanks

Seems to me you would just put something like<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN"
        "http://www.w3.org/TR/REC-html40/loose.dtd">before your root element. Or whichever DTD you actually want. I found out about them here:
http://www.utoronto.ca/webdocs/HTMLdocs/HTML_Spec/html.html

Similar Messages

  • Create an XML document from a HTML form???

    Good morning, is it possible to create an XML document from a HTML form
    if yes, can someone tell me how to proceed exactely, I would be very thankful!

    Hi,
    A very simple intro at this link. Apologies for anything unclear.
    http://cswww.essex.ac.uk/TechnicalGroup/TechnicalHelp/xmlCreate.htm
    best
    kev

  • Create a word document with TOC, table,etc

    Hi,
    How to create a word document with Table of content(TOC),header, footer, table, etc?
    Help me with any APIs or examples. I have already tried with POI API, but couldnt create TOC.. So any other api or any solution is available to create complex word document.
    Thank you

    Hi BIJ001,
    Thanks for your valuable suggestion.
    Open standards WordprocessingML format is supports by Microsoft word. It is typical xml format of designing word document. But creating document with TOC,tables, different styles of paragraphs are complex. Using this format, i have created simple docs. I never tried with complex formats like TOC. The generating File should be in ".doc or .docx" format only.
    Hi gimbal2,
    I am parallely looking to find solution in OpenOffice format also. But i never try out ".docx" file format. I will try to look out this option.
    Thanks for the input.
    Edited by: user13735134 on May 24, 2011 6:55 AM

  • Create a new document with settings appropriate for SWF or XFL output.

    I'm studying up for the CS4 ACE exam, and I'm stumped on something. In the "Laying out a Document" section, it says: "Create a new document with settings appropriate for SWF or XFL output." There isn't really anything specific to creating a document for flash, except that you wouldn't add bleed. I can't find anything online that addresses this. Am I missing something here? Any document can be exported to SWF or XFL. This seems rather ambiguous. What is there to know about this?

    You're right that any document can be exported to SWF or XFL. I'm not sure what you're going to be asked on the ACE exam, but here are some resources:
    Help topic:
    http://help.adobe.com/en_US/InDesign/6.0/WS2DECDF40-B6DA-40b6-804F-2703D6C6A460.html
    Tim Cole's first of 3-part series:
    http://blogs.adobe.com/indesignchannel/2008/11/indesign_2_flash_part_i_1.html
    My blog entry:
    http://blogs.adobe.com/indesigndocs/2009/03/exporting_interactive_indesign.html

  • How to Create an XML document from XSQL servlet which follows a particular DTD struct

    how to Create an XML document from XSQL servlet which follows a particular DTD structure.Could anyone send me a sample code for this.

    You'll need to associate an XSLT transformation with your XSQL page that transforms the canonical result into your DTD-valid format.
    For example, given an XSQL page like:
    <?xml version="1.0"?>
    <?xml-stylesheet type="text/xsl" href="rss.xsl" ?>
    <xsql:query max-rows="3" connection="demo" xmlns:xsql="urn:oracle-xsql">
    select title,id,description,url,to_char(timestamp,'Mon DD') timestamp
    from site_entry
    order by id desc
    </xsql:query>and an "rss.xsl" stylesheet that looks like this:
    <?xml version="1.0"?>
    <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0">
    <xsl:output method="xml" indent="yes" doctype-system="rss-0.91.dtd"/>
    <xsl:template match="/">
    <xsl:for-each select="ROWSET/ROW">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    <xsl:for-each select="ITEM">
    <item>
    <title><xsl:value-of select="TITLE"/></title>
    <link><xsl:value-of select="URL"/></link>
    <description><xsl:value-of select="DESCRIPTION"/></description>
    </item>
    </xsl:for-each>
    </channel>
    </rss>
    </xsl:for-each>
    </xsl:template>
    </xsl:stylesheet>You produce DTD-valid output against the rss-0.91.dtd DTD that looks like:
    <?xml version = '1.0' encoding = 'UTF-8'?>
    <!DOCTYPE rss SYSTEM "rss-0.91.dtd">
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>
    <rss version="0.91">
    <channel>
    <title>Do You XML?</title>
    <link>http://xml.us.oracle.com</link>
    <description>Oracle XML Website Demo</description>
    <language>en-us</language>
    </channel>
    </rss>

  • Open XML document with proper layout

    Hi,
    I created my own XML form and I have problem when accessing the document within "KM Content".
    Indeed, when I click on the XML file generated by the XML Form it doesn't render it with the "Show" form but rather displays it as an usual XML document (with all its tags).
    Hint:
    I linked my iView to a custom CM repository. But, if I link my iView containing the XML Form to the out-of-the-box CM repository "/documents", it works fine.
    What should I do to make this work?
    Thanks in advance,
    Eric

    Hi Eric,
    in the Configuration under 'System Administration' -> 'System Configuration' -> 'Knowledge Management' -> 'Content Management' -> 'Repository Filters' you can find a filter named 'xmlforms_filter'. Some repositories are registered for this filter (in the standard e.g. documents). You should add your repositoriy here. After that the files in your repository should use the Show-form when being displayed.
    Hope this helps
    Karin

  • Please help; how to write XML document with JSP?

    I try to write XML document with JSP...
    But I got wrong results everytime.
    The result is not XML file displayed in the browser,
    but HTML file.
    I even tried to use HTML special code for <, >, "
    but still display as HTML file not XML file.
    How to do this?
    Thanks in advance. I put my codes below.
    Sincerely,
    Ted.
    ================
    Here is code for the JSP (called stk.jsp):
    <%@ page contentType="text/xml" %>
    <%@ page import="bean.Stock" %>
    <jsp:useBean id="portfolio" class="bean.Portfolio" />
    <% java.util.Iterator pfolio = portfolio.getPortfolio();
    Stock stock = null; %>
    <?xml version="1.0" encoding="UTF-8"?>
    <portfolio>
    <% while (pfolio.hasNext())
    stock = (Stock) pfolio.next(); %>
    <stock>
    <symbol>
    <%=stock.getSymbol() %>
    </symbol>
    <name><%=stock.getName() %> </name>
    <price><%=stock.getPrice() %> </price>
    </stock>
    <% } %>
    </portfolio>
    =================
    Here is the code for bean.Stock:
    package bean;
    public class Stock implements java.io.Serializable
    String symbol, name;
    float price;
    public Stock(String symbol, String name, float price)
    this.symbol = symbol;
    this.name = name;
    this.price = price;
    public String getSymbol()
    return symbol;
    public String getName()
    return name;
    public float getPrice()
    return price;
    ===============
    And here is bean.Portfolio:
    package bean;
    import java.util.Iterator;
    import java.util.Vector;
    public class Portfolio implements java.io.Serializable
    private Vector portfolio = new Vector();
    public Portfolio()
    portfolio.addElement(new Stock("SUNW", "Sun Microsystem", 34.5f));
    portfolio.addElement(new Stock("HWP", "Hewlett Packard", 15.15f));
    portfolio.addElement(new Stock("AMCC", "Applied Micro Circuit Corp.", 101.35f));
    public Iterator getPortfolio()
    return portfolio.iterator();
    }

    Hi
    I'm not sure whta your query is but I tested your code as it is has been pasted and it seems to work fine. There is an XML output that I'm getting.
    Keep me posted.
    Good Luck!
    Eshwar Rao
    Developer Technical Support
    Sun microsystems
    http://www.sun.com/developers/support

  • How to create a XML document

    Hi,
    I am new to XML and don't understand when to use what.
    I have a java.sql.ResultSet and wants do create a XML document.
    When should I use the following methods ?
    - createElement
    - createAttribute
    - createCDATASection
    - createTextNode
    I think I have to create at least a "root" element, right ?
    Should every column in my resultset be an element and its value an attribute ?
    When should I use CDATA and Text ?
    Please explain this to me.
    Regards Uffe

    Hi,
    Use CDATA sections when you know the string will include some funny characters e.g. ?,<,> etc.
    You can decide yourself whether to create an attribute or a separate element.
    e.g. <book isbn="1234">The Spice Girls</book>
    or
    <book>The Spice Girls
    <isbn>1234</isbn>
    </book>
    I do not know about you, but I like the first better, using attributes.
    It is up to individual preference, but it all depends what you intend to do with the data. At the moment, there is little understanding of how to map a/some xml files to a database type relation.
    Many people are trying to force XML documents into relational database schemas, soem use object-oriented databasese.
    Another suggestion is to treat the whole internet as a big web-site.
    Who knows what is the next big decision, I do not think even the experts know! So, what do you think, your thoughts in this are as important as everybody elses.
    best
    kev

  • XML document with the folder heirarchy

    Can you create an XML document having the current heirarchy of folders and all their custom attributes in IFS. If yes HOW? If no what other way is there to get all the folders and their custom attributes.
    null

    Yes, it is possible to create a folder hierarchy with custom attributes via XML in iFS.
    You would first create an XML type definition file for one or more extended folder types with the corresponding custom attributes. Then, you would create instances of your custom folder types. The values of the custom attributes would be supplied as the values of elements which correspond to thos attributes. The parent folder of each instance would be specified using the <FOLDERPATH> element.
    Instructions and examples are provided in the Oracle iFS Developer's Guide, chapter 4. Although this chapter illustrates how to extend the Document class, and create instances of Documents, the same can be done with Folders.

  • Not able to create a material document with movement type 103

    I am not able to create a material document with movement type 103,
    The system is populating the value as 101 .
    How do I create a matdoc with movement type 103?

    What is the error you receive? Please specify with message number.
    On MIGO, you need to change the default value mvmt type value to 103 before you enter the PO number to be able to do 103.
    Once this defualt value is set, you can enter the PO and item number in the document number fields and proceed with 103.
    But you cannot change the mvmt type for already entered items from 101-103 or vice versa.
    I think the 101-103 and 103-101 mvmt type conversion message is standard error message

  • ClassCastException while creating an XML document in servlet

    HI,
    I am trying to create an XML document in a servlet and I am getting ClassCastException at runtime when casting org.w3c.dom.document to org.apache.crimson.tree.XmlDocument . I am using Tomcat 4.1
    The same code is working fine when executed in a stand alone java program
    Can anyone please help me in trying to solve this problem. I require it urgently.
    The following is my code:
    import java.io.*;
    import javax.xml.parsers.*;
    import org.w3c.dom.*;
    import org.apache.crimson.tree.XmlDocument;
    public class test{
    public void createxml (String username) throws Exception
              Document doc=null;
              DocumentBuilderFactory dbf=null;
         DocumentBuilder db=null;
         Element root=null;
         Element poline=null;
         org.apache.crimson.tree.XmlDocument xmldoc=null;
         FileOutputStream fos=null;
         dbf = DocumentBuilderFactory.newInstance ();
              db = dbf.newDocumentBuilder ();
              doc = db.newDocument ();
              root = doc.createElement ("album");
              doc.appendChild (root);
              poline= doc.createElement("album-name");
              root.appendChild(poline);
    //I am getting the ClassCastException in this statement
              xmldoc = (XmlDocument) doc;
              fos = new java.io.FileOutputStream("xyz.xml");
              xmldoc.write(fos);
              fos.close();
    }

    I am not too much of an expert on this issue, but I did a search. Maybe this page can help or point you in the right direction.
    http://www.jspwiki.org/Wiki.jsp?page=A2AClassCastException
    I hope this helps.

  • How to create an XML document from a String.

    Can anyone help,
         In the Microsoft XML Document DOM there is a load function load(string) which will create an XML document, but now we are switching to Java and I do not know how to create and XML document from a string, this string �xml document� is passed to my program from a webservice and I need to read several xml elements form it in a web server.
    This string is a well formatted XML document:
    <?xml version="1.0" encoding="UTF-8"?>
    <Countries NumberOfRecords="1" LanguageID="en-us">
         <Country>
              <CountryCode>AU</CountryCode>
              <CountryName>AUSTRALIA</CountryName>
         </Country>
    </Countries>

    Thanks PC!
    I made it work using:
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder builder = factory.newDocumentBuilder();
    factory.setIgnoringComments(true); // We want to ignore comments
    // Now use the factory to create a DOM parser
    DocumentBuilder parser = factory.newDocumentBuilder();
    //TransformThisStringBuffer is a string buffer wich contain the 'XML document (String)'
    InputStream in = new ByteArrayInputStream(TransformThisStringBuffer.toString().getBytes());
    // Parse the InputStream and build the document
    Document document = parser.parse(in);
    But which one is faster InputSource or InputStream, were would you put the "new InputSource(new StringReader(yourString))" in the above code?

  • BAPI to create a billing document with reference to delivery or sales order

    Hi,
    Does anyone know any BAPI or function module that allows the creation of a billing document with reference to a sales order or to a delivery.
    Maybe the BAPI_BILLINGDOC_CREATEFROMDATA may be used to create a billing document with reference to a sales document, but i'm looking for a solution where I only need to indicate the number of the reference sales order or the reference delivery and maybe some few data more without the need of transfer all the items and conditions information.
    Thanks.
    Kind regards,
    Paulo Sousa

    Hello Paulo,
    To create a billing document based on a delivery use BAPI_BILLINGDOC_CREATEMULTIPLE. In table BILLINGDATAIN insert one line with the following data:
    REF_DOC = Delivery number
    REF_DOC_CA = 'J'
    If it runs fine, table SUCCESS will bring back useful data, like BILL_DOC (Billing document number).
    Regards,
    Joã

  • How to create a  PDF document with page curls using Adobe  CS 4?

    My  goal is to create a  PDF document with page curls. I am using Adobe  CS 4.
    1.      The document was created in Adobe InDesign  CS 4  where the page  turn (curl) transition  was applied.
    2.      Then the document was exported to .swf.
    3.     The .swf file was imported into   Adobe Acrobat Pro  to create a PDF file with  flip page or page curl transitions.
    These are the problems.
    1.      The background is not  transparent.
    2.      Page dimensions have to be increased at least an inch in width and length so that the full page can show
    3.      The command and+   will not only increases the document's  screen size. It increases the page margins.

    PDF was never designed to support the Flash page curl effect (it didn't exist back then). Anything you try (and you've tried the standard hack) will look like a hack. Personally, I don't think the effort is worth it for an effect that's much overused.

  • I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers.

    I created a word document with hyperlinks. When my default browser is Chrome the hyper links work. When the default browser is Safari, the hyperlinks bring to pages that just lines and lines of symbols. I need these links to work in both browsers. Any ideas?

    version 10.6.8

Maybe you are looking for

  • How do I rebuild a Flex 3.0/SDK 3.2 application in Flash Builder 4.7?

    I am trying to rebuild an old Adobe Flex/Air app.  The original developer is gone and we don't have the development environment he used available to us to do the rebuild.  As best I can see, this is an Adobe Flex SDK 3.2 application rebuilt in Flex B

  • Issue of Outgoing payment F-53

    I have a problem about document currency. Actually, our PO, GR/IR is based on USD currency. But when we did clearing by F-53, we use our local currency for document currency. I would like to know is better to use USD as document currency or local cur

  • Problem CRM System - Component provider_dl failed opend.

    Hi, i have problem open component provider_dl (CRM_UI) Error when processing your request What has happened? The URL http://ctsx64ntcrm.ctsnx.com:8000/sap/bc/bsp/sap/provdlframe/BSPWDApplication.do was not called due to an error. Note The following e

  • Good Calendar Package?

    I'm not much of a programmer. I wonder if anyone can suggest a good package for creating a calendar for my group's web page. We would want to display events and have links to more information and a link to a shopping cart.

  • Sun Java DS Control Center Problem

    Hi, I've installed DSEE 6 on solaris 9 x86 and setup communication express which is working fine. I'm even able to login into control center but it does NOT show any directory servers. how do i get my Director server listed in webconsole to manage? +