Html to Xml translation

Hi!
Are there any good 'ready-made' translators out there?
I'm parsing an xml feed consisting of a lot of elements with CDATA-sections.
Stuff like:
<p>
</br> is common.
I need to translate the html entities to xml entities since I will put the data in a new xml file - without CDATA
sections.
Well, best case scenario would be to translate. Second best would be to strip out the html entities.
/best regards, Håkan Jacobsson - System developer in Stockholm, Sweden

There are tools for converting HTML to XHTML out there, yes. Some of them are written in Java and some aren't but I'm not sure that should matter to you.
I didn't understand what the part about CDATA meant, but generally parsers will convert CDATA sections to the equivalent text elements without even having to be asked.

Similar Messages

  • HTML to XML/cXML

    Will XI "translate" html data into XML or cXML for order transmission?  
    I ask this because of the <SupplierAuxiliaryID> we use in cXML to capture supplier cookie information.    Today, when we bring a punchout shopping cart back from a client, they send a cookie in the <SupplierAuxiliaryID> cXML tag.   That tag remains embedded in the requisition and flows through in the cXML order transmission to the vendor, and is critical.    If we moved the client to OCI(Open Catalog Interface), which would result in the shopping cart being transmitted to us in html, when XI "translates" that html data into cXML (or XML) for order transmission to the vendor, will that <SupplierAuxiliaryID> still be included?
    Thanks in advance.
    KP

    Can you give me more information on this XI MarketPlace adapter?
    In the scenario i mentioned, the "SupplierAuxiliaryID" that is passed in cXML is specific to Ariba but in the SRM Punchout, its handled directly through the OCI, but i am not sure whether we need the XI to integrate with the R/3 or the SRM in this case to translate the IDOC Purchase order into cXML.
    Also, the IDOC's can be mapped to cXML directly by downloading the cXML DTD from cXML.org but i am not sure why we need an adapter here.
    If you can throw more insight that will be more helpful.
    Thanks for the response.
    KP

  • HTML and XML files open in same window(KM Navigation iView)

    Hi All,
    I have created a KM navigation which is pointing the folder inside the documents repository. This folder contains HTML and XML files. It is rendering fine. But, when I click on the file links in KM Navigation iView, it is opening in new window.Here I need to open in same window. How can I acheive this?. Please help me.
    Thanks & Regards,
    Venkatesh R

    Hi ,
    check the below thread and try options mentioned in it
    https://www.sdn.sap.com/irj/sdn/thread?threadID=72594
    Koti Reddy

  • Export pdf to html/txt/xml

    Hi,
    I downloaded "adobe acrobat x pro" for trying the "save as"/export functionality to xml/htm/text etc. and the result was exactly what I was looking for in terms of output, keeping formatting etc.
    However, I am building an application which need to have an embeded library in order to do pdf to html/txt/xml conversion on the fly keeping formatting.
    I have tried a number of libraries for pdf to html/txt/xml conversion an none of them deliver anything near what adobe acrobat x pro does in terms om keeping format/tables etc.
    So, my question is how can I get access to the "save as"/export functionality in adobe acrobat x pro in any official adobe library, sdk, service, product etc. since I assume acrobat x pro does not expose any api for convert functionality or may be used serverside?
    Best regards,
    Rick

    It sounds like you want to use Acrobat as a web service. Rather than pursue this route, you may want to note that such a use of Acrobat is not permitted under the license. Thus it may not worth pursuing. Why convert to HTML is a possible question anyway, at least on a regular basis? On occasions I can understand the need.
    For programmable features you should probably check in the SDK forum.

  • HTML to XML Conversion ?

    Developed a content presentation java servlet implmenting xmlparser2.jar classes, works well. We're storing content (in XML) format as blob, then using parser we are able to do the transformation of the xml file to HTML for presentation.
    stream = null;
    String result = null;
    URL URLStream = new URL(xmlIn);
    ByteArrayOutputStream xbaos = new ByteArrayOutputStream();
    if(mStylesheet.startsWith("http"))
    stream = getURLInputStream(mStylesheet);
    else
    stream = new FileInputStream(mStylesheet);
    XSLProcessor processor = new XSLProcessor();
    DOMParser parser = new DOMParser();
    parser.setValidationMode(false);
    parser.setPreserveWhitespace(true);
    parser.parse(in);
    xdoc = parser.getDocument();
    XSLStylesheet xss = new XSLStylesheet(stream, URLStream);
    processor.processXSL(xss, xdoc, xbaos);
    result = xbaos.toString();
    parser.reset();
    return result; -- HTML conversion
    We are evaluating using xslt to convert the XML to a form based medium for content maintenance. Wondering if once a XML document is parsed to HTML (DOM) can it be parsed back to XML for subsequent update to stored value in blob column. Specifically interested in conversion (parser) from HTML to XML
    Simply can HTML (in DOM format validated against a xsd) be transformed back to XML ?

    Do you know of a method in the xdk that takes a well formed HTML doc and using xsd / xslt convert back to original xml spec?
    Because you created (and as long as you create) the HTML from XML it will be well formed (every tag will be ended with an end-tag) and you can therefore transform it back into XML.
    Most times it will not be possible to convert HTML found on the 'internet' into XML because this HTML is not well formed. For example, many people forget to end a paragraph of text within HTML with the </p> tag.
    We are evaluating using xslt to convert the XML to a form based medium for content maintenance. Wondering if once a XML document is parsed to HTML (DOM) can it be parsed back to XML for subsequent update to stored value in blob column. Specifically interested in conversion (parser) from HTML to XML
    Simply can HTML (in DOM format validated against a xsd) be transformed back to XML ?

  • HTML to XML converter

    please who knows where one can download a java HTML-to-XML converter class where all that is needed is to supply any http link and it will output XML to the outputstream or whatever
    thanks

    You must realize that there is no possible way all valid HTML can be made into valid (well-formed) XML - right?
    html can have over lapping tags (not real tags here, but you'll see):
    <tag1>
    <tag2>
    <tag1>
    <tag2>
    That's valid html, but totally invalid xml (xml doesn't let you overlap tags).
    If you're using XHTML, then your html is already xml.
    If you're going from XML to HTML, then you can use XSTL; but it won't work in the other direction.

  • EDI to XML Translator for Java

    Anyone know about an EDI to XML translator which can be called from a Java program ?
    I already know about OBOE and XEDI
    Thanks!

    hello,
    do u know any any Api which can which can translate edi to xml and xml to edi which i can use in my java code .
    Thanks
    santak

  • BPELConsole: Initiate does not show HTML or XML form to fill in variables

    Hi,
    i am using a xsd with a cascaded import of other xsds.
    If i use one import layer everything is fine.
    But if i use something like:
    1.xsd (imports 2.xsd)
    2.xsd (imports 3.xsd)
    The BPELConsole refuses to show me a HTML or XML form where i can fill in the variables...

    Hi,
    For time being create one dummy process with request and response as a string type and call your process with the [xml]string input by creating partnerlink.
    Generate xml from the schema with xml generator tools.
    or use java api to invoke the process.
    Regards,
    Bogi

  • Teststand XML Translator For LOOP Step

    HI, I'm trying to write an XML translator usinc the C++ example. So far I made work "if" , "while" , "end" and i'm trying to make the "for" loop working as well but i have a issue when i insert the dataProperty.
    The XML code i wrote id the following :
    <Data dataProperty="InitializationExpr" type = "string"> <Value>"Locals = 0"</Value> </Data><Data dataProperty="ConditionExpr" type = "string"> <Value>"Locals &lt; 10"</Value> </Data><Data dataProperty="IncrementExpr" type = "string"> <Value>"Locals += 1"</Value> </Data> 
    so the issie is that is i use the " " it works in the PropertyBrowser window but not in the For Loop window and if i dont use the " " is the opposite.
    I even tried to change the property CustomLoop followinf the same syntax but it doesnt work:
    <Data dataProperty="CustomLoop" type = "bool"> <Value>true</Value> </Data> 
    can anybosy help me with this?
    thank you
    Luca

    If I use Locals.X == 10 it gives me an error in the Number of Loop field in the For Loop window. What i really would like to know is how to set the properties for every step because beside few of them that i can set with dataProperty="ConditionExpr" or dataProperty="TitleExpr" i dont know how to set the other ones.
    For istance if i want to have a Sequence Call (I already wrote code so to have more then one Sequence) in a Sequence that calls another one i can have code like this:
    <Sequence name="MainSequence">
    <Step name="CallSeq2" type="SeqCall">
    </Step>
    </Sequence>
    <Sequence name="MainSequence2">
    </Sequence>
    now I dont know how to pass values to the step so to fill the File Pathname and Sequence fields in the Module window can I use dataProperty? and in cas I can what is the Sintax?
    thank you
    Luca

  • Change html to xml

    hello everybody im just a novce here very new to jsp and xml. Could someone teach how to make html to xml. Actually html is to display mysql data but I want it on xml could somebn\ody help here is the code this is a jsp file.
    <%@ page import="java.sql.*" %>
    <%@ page import="java.io.*" %>
    <%@ page import="java.util.Date" %>
    <%
         Connection conn = null;
         Statement stmt = null;
         ResultSet rset = null;
         String SQLCOM = "";
         Class.forName("org.gjt.mm.mysql.Driver").newInstance();
         conn=DriverManager.getConnection("jdbc:mysql://localhost/test1");
         stmt = conn.createStatement();
    %>
    <html>
    <body>
    <hr>
    <%
         SQLCOM =     "select "+
                        "id_ctry, "+
                        "name "+
                        "from countries "+
                        "order by name ";
         rset = stmt.executeQuery(SQLCOM);
         while( rset.next() ) { %>
              <%= rset.getString("id_ctry") %>,
              <%= rset.getString("name") %><br>
    <%     }
         conn.close();
    %>
    <hr>
    </body>
    </html>

    Hello ABAP_SAP_ABAP ,
                                          Youneed to select the option "generate template data " and then on the displaying template there you will see the option for editing in the top left corner toolbar.
    Then after editing you can do a XMl syntax check and test your proxy.
    Hope this helps.
    Thanks,
    Greetson

  • Converting PDF Files to Html or Xml

    how can i tranfrom the pdf file to html or xml using Acrobat's API? The software already have the function(http://tv.adobe.com/watch/learn-acrobat-x/converting-pdf-files-to-other-file-formats/). In C# ,I can use the acrobat's dll open the pdf file  and  can invoke the  MenuItem SaveAs;
    like this:
                AcroApp.Show();
                AcroAVDoc.Open(@"D:\xpdf\a.pdf","aaaa");
                AcroApp.MenuItemExecute("SaveAs");
                AcroApp.CloseAllDocs();
                AcroApp.Exit();
    But this is not automatic.

    Try the forum for Acrobat SDK.

  • How to convert HTML into XML

    I know I can parse XML into some HTML, but is there any tools or methods existed to parse HTML into XML?
    I have a not well-formed HTML with a lot data fields, including a lot not closed tags. This HTML is generated by some XML(as I can see), but I can't find a way to reform it into a XML, and eventually stored the data into another database.
    Anyone can help me? I appreciate!
    KIB

    As SAm has told you, you can use jTidy, for the purpose, a sample code , which can convert an html file to xml file is given at following url:
    see the documentation as well.
    http://sourceforge.net/docman/display_doc.php?docid=1298&group_id=13153
    gaurav_k1

  • How do I generate HTML from XML & XSL using XSL Processor ?

    I want to generate a HTML from XML & XSL using XDK for C on
    linux-8i.
    I run the XSLSample well.
    But it only generate a XML from a XML & a XSL.
    Can any one give me some advise or sample code?

    Just use HTML tags instead of xml tags in your stylesheet, and
    you'll generate HTML instead.
    <xsl:stylesheet version="1.0"
    xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:template match="/">
        <html>
          <body>
            <xsl:for-each select="ROWSET">
              <table border="1" cellspacing="0">
                <xsl:for-each select="ROW">
                  <tr>
                    <td><xsl:value-of select="EMPNO"/></td>
                    <td><xsl:value-of select="ENAME"/></td>
                  </tr>
                </xsl:for-each>
              </table>
            </xsl:for-each>
          </body>
        </html>
      </xsl:template>
    </xsl:stylesheet>

  • Read datas from HTML or XML file in LabView

    Hi all,
    I need help in the following. I need to read the measurement results from test report into LabView. Test report format is HTML or XML. Please give me some advice on how to do this?
    Thank you.
    Mik

    A quick search through the forums will point you to this thread which has some excellent advice and a effecient parser vi
    Jeff

  • How to include HTML in XML for OMNIPORTLET

    I have an OMNIPORTLET where I need to display a list of names along with a link to a story if they have a story.
    The goal is to list that NAME and if they have a story then show a (STORY) with a link under the STORY, and then for those names that do not have stories nothing would show for the second column.
    example below:
    ACME Rockets
    ACME Skis ( [Success Story|http://www.oracle.com])
    ACME Sleds
    The feed works correctly in displaying the names, but I need some guidance on how to handle displaying the Story link.
    In the XML file I have a tag for REFERENCE_URL and then within that tag is the &lt;a href="..."&gt; coding using *&lgt;* type escape characters to insure the HTML comes across embedded in the case where there is a Reference story. Also, when there is not a story, then the tag is left blank.
    The file looks fine when I check it out, but then when I include it in the OMNIPORTLET and run the Test button on the first page of the portlet configuration, all of the ampersands in front of the less than and greater than escape characters show that they are turned into having an extra ampersand in front of them.
    In the OMNIPORTLET I am using:
    * an HTML View
    * in the Layout in the Repeating Section with in the table column I display the ##COMPANY_NAME## and then the ##REFERENCE_URL## expecting to have the Reference URL push out a live HTML anchor and link.
    What happens is that I get a text display of the anchor instead of it coming out in HTML code to actually be an anchor.
    i.e.: ACME Systems &lt;a href="http://www.oracle.com/examplelink.pdf" target="_blank"&gt;Success Story&lt;/a&gt;
    Any guidance on what I should change or another method to handle what I am needing to do?
    Thanks,
    Stephen
    Edited by: slsmith on Feb 5, 2010 2:27 PM

    The define the "should not alter part" as CDATA?
    http://www.w3schools.com/XML/xml_cdata.asp

Maybe you are looking for