Parsing XML with html tags for style

I'm using flash to pull in XML data, but I want to use html
tags to be able to style the text. When I add any html, it treats
it as a sub-node and ignores the data. Also, line breaks in the xml
are being converted to double spaced paragraphs? The relevant code
is basically this:
if (element.nodeName.toUpperCase() == "TEXT")
{//add text to text array
ar_text[s]=element.firstChild.nodeValue;
textbox1.text = ar_text[0];

try to use htmlText instead text... like this:
textbox1.htmlText = ar_text[0]
adam

Similar Messages

  • XML with HTML Tags... (easy points) 11g question

    Dear Programming Gods,
    I have been researching this for about 2 weeks now, and I have hit the final road block.
    Using BI Publisher 11.1.1
    In APEX 4.0 I have a Rich Text Field. The data from the Rich Text Field is store in CLOB. The data has HTML formatting tags. I have a data model that selects the data. I create an xml which has the html tags. I export the xml and import it into MS Word using the BI Publisher add-in. I import my subtemplate which handles almost all of the formatting tags. I apply the template to the CLOB field so that the HTML formatting tags will be rendered when printed.
    The problem is this. The subtemplate is looking for this < and / > however BI publisher convters the tags stored in the CLOB from raw html tags to this &.lt; and &.gt; so the subtemplate can not match to it.
    Here is what I need to figure out and please explain it in very novice terms.
    When I generate and export the XML from BI Publisher how do I prevent it from converting my raw tags?
    Here is some further assistance when prepairing your answer.
    My subtemplate is based on the htmlmarkup.xsl from the following blog but has been modified heavily to include support for simple tables, more formatting such as subscripts and superscripts, ect...
    http://blogs.oracle.com/xmlpublisher/2007/01/formatting_html_with_templates.html
    I am also familliar with this blog but I do not understand how to implement it using BI 11g.
    http://blogs.oracle.com/xmlpublisher/2009/08/raw_data.html
    I have tried adding this to my layout but it doesnt seem to work.
    <xsl: element name="R_CLOB" dataType="xdo:xml" value="R_CLOB" / >
    Please, help me. I have to have this working in 4 days.
    Richard

    This did not work either. Here's more infor on what I have so far.
    My data template looks like this:
    <dataTemplate name="Data" description="Template">
         <parameters>
              <parameter name="p_person_id" dataType="character" defaultValue="1"/>
         </parameters>
         <dataQuery>
              <sqlStatement name="Q1">
                                  select TEMPORARY_TEMPLATE_DATA.line_id as LABEL_line_ID,
    TEMPORARY_TEMPLATE_DATA.column_id as LABEL_column_ID,
    TEMPORARY_TEMPLATE_DATA.person_id as LABEL_PERSON_ID,
    TEMPORARY_TEMPLATE_DATA.label as LABEL_DATA
    from MY_BIO.clm_TEMPORARY_TEMPLATE_DATA TEMPORARY_TEMPLATE_DATA
    Where person_id = :p_person_id
    and style = 'L'
                             </sqlStatement>
              <sqlStatement name="Q2" parentQuery="Q1" parentColumn="LABEL_DATA">
                                  select TEMPORARY_TEMPLATE_DATA.LINE_ID as LINE_ID,
    TEMPORARY_TEMPLATE_DATA.COLUMN_ID as COLUMN_ID,
    TEMPORARY_TEMPLATE_DATA.label as COLUMN_LABEL,
    to_nclob(TEMPORARY_TEMPLATE_DATA.COLUMN_DATA) as  COLUMN_DATA,
    TEMPORARY_TEMPLATE_DATA.STYLE as STYLE,
    TEMPORARY_TEMPLATE_DATA.ATTRIBUTE as ATTRIBUTE,
    NVL(TEMPORARY_TEMPLATE_DATA.JUSTIFY,'L') as JUSTIFY
    from MY_BIO.clm_TEMPORARY_TEMPLATE_DATA TEMPORARY_TEMPLATE_DATA
    Where person_id =:p_person_id
    and label = :LABEL_DATA
    and style != 'L'
    Order by line_id, column_id
                             </sqlStatement>
         </dataQuery>
         <dataStructure>
              <group name="G_LABEL" source="Q1">
                   <element name="LColumnData" value="label_data"/>
                   <group name="G_DATA" parentGroup="G_Label" source="Q2">
                        <element name="LineID" value="line_id"/>
                        <element name="ColumnID" value="column_id"/>
                        <element name="ColumnData" value="column_data"/>
                        <element name="Style" value="style"/>
                        <element name="Attribute" value="attribute"/>
                        <element name="Justify" value="justify"/>
                   </group>
              </group>
         </dataStructure>
    </dataTemplate>
    After running this data_template there was no change in the xml file generated see partial :  Note:
    my test actually has the B with the html tags
    </G_DATA>
    - <G_DATA>
    <LINEID>20</LINEID>
    <COLUMNID>1</COLUMNID>
    <COLUMNDATA>test test <B>my test</B></COLUMNDATA>
    <STYLE>R</STYLE>
    <ATTRIBUTE />
    <JUSTIFY>C</JUSTIFY>
    </G_DATA>
    - <G_DATA>
    <LINEID>21</LINEID>
    I loaded in to MS Word but there was no change documnet still look the same. I left the commands import file command and xsl:apply-templates command in the word document template.
    I really appreciate you helpiing me.
    cheryl

  • Parsing XML with invalid URI for DTD

    When parsing an XML file (with aelfred2) I get the following error:
    Exception in thread "main" gnu.xml.dom.ls.DomLSException: Absolute URL required with null context: CQCGWProtocol.DTD
    at gnu.xml.dom.ls.DomLSParser.doParse(libgcj.so.7)
    at gnu.xml.dom.ls.DomLSParser.parse(libgcj.so.7)
    at gnu.xml.dom.DomDocumentBuilder.parse(libgcj.so.7)
    at CQC.main(CQC.java:44)
    Caused by: java.net.MalformedURLException: Absolute URL required with null context: CQCGWProtocol.DTD
    at java.net.URL.<init>(libgcj.so.7)
    at java.net.URL.<init>(libgcj.so.7)
    at gnu.xml.aelfred2.XmlParser.pushURL(libgcj.so.7)
    at gnu.xml.aelfred2.XmlParser.parseDoctypedecl(libgcj.so.7)
    at gnu.xml.aelfred2.XmlParser.parseProlog(libgcj.so.7)
    at gnu.xml.aelfred2.XmlParser.parseDocument(libgcj.so.7)
    I'm puzzled, as I have disabled validation:
    DocumentBuilderFactory domFactory = DocumentBuilderFactory.newInstance();
    domFactory.setIgnoringComments(true);
    domFactory.setNamespaceAware(false);
    domFactory.setValidating(false);
    My goal is to have the parser ignore the DOCTYPE tag and not try to find the DTD. Can someone suggest how you turn this off - apparently, setting the validation to false is not the right approach.
    I'm running Java 1.4.2 on Fidora Core 5.
    Thanks for suggestions!

    Create an org.xml.sax.EntityResolver and apply it to your parser. The API documentation for the interface has an example of how to write one.
    And no, turning of validation doesn't turn off processing of DTDs because DTDs are for things other than validation. Entity replacement, for example.

  • Parsing XML with incomplete tags

    Message was edited by:
    user490857

    Hello,
    How about the following?
    Change your XML document to:
    <?xml version='1.0' encoding='utf-8'?>
    <response>
         <title> this is book on &amp;lt;tags&amp;gt; Order </title>
    </response>
    Running the following code:
    String xmlstring = "<?xml version='1.0' encoding='utf-8'?><response><title> this is book on &amp;lt;tags&amp;gt; Order </title></response>";
    DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
    DocumentBuilder db = factory.newDocumentBuilder();
    InputSource inStream = new InputSource();
    inStream.setCharacterStream(new StringReader(xmlstring));
    Document doc1 = db.parse(inStream);              
    System.out.println(doc1.getDocumentElement().getFirstChild().getFirstChild().getNodeValue());
    Will produce the following result:
    this is book on <tags> Order
    -Blaise
    Message was edited by:
    Blaise Doughan

  • How to put String with html tags as it is into xml

    I am using apache dom API to create xml from java.
    I have a string with html tags in it .when I add the string to xml, its replacing all the "<"; with &lt and ">" with > I would like the html tags to look as it is instead of the > and & lt;. How can I acheive that
    this is the code snippet of what I am doing
    In java class
    String titleString = "<font color=red>This Is an Example of a Red Subject</font>"
    Document doc = new DocumentImpl();
    Element root = doc.createElement("bulletin");
    Element item = doc.createElement("title");
    item.appendChild(doc.createTextNode(titleString));
    In Xml it looks like below
    <title><font color=red>This Is an Example of a Red Subject</font></title>
    but I would like to have the xml like below
    <title><font color="red">This Is an Example of a Red Subject</font></title>
    Can you please suggest me whats the best way to acheive this.
    I appreciate all your help
    Thank you
    Suma

    One problem is that you don't understand escaping. If you re-read what you posted you'll see that what you say you get, and what you say you want, are identical. That's because you didn't escape one of the two properly. So your first step should be to find the section about escaping in Chapter 1 of your XML book and read it carefully. Figure out what you should have done here (yes, the same rules apply).
    However, to attempt to answer what I think your question is: if you have a String which contains markup, and you want to convert that String to XML elements, then you have to feed the String into an XML parser.

  • Tablespace usage report generated with html tags instead of text

    Hi ,
    We have a unix shell script scheduled to find tablespace usage and sends the report to our mail id.
    For the past few weeks(no changes idone in the script) the report is coming with html tags instead of text as below.
    </head>
    <body>
    <p>
    <table border='1' width='90%' align='center' summary='Script output'>
    <tr>
    <th scope="col">
    TABLESPACE_NAME
    </th>
    <th scope="col">
    CUR_USE_MB
    </th>
    <th scope="col">
    CUR_SZ_MB
    </th>
    <th scope="col">
    CUR_PRCT_FULL
    </th>
    <th scope="col">
    FREE_SPACE_MB
    </th>
    <th scope="col">
    MAX_SZ_MB
    </th>
    <th scope="col">
    OVERALL_PRCT_FULL
    </th>
    </tr>
    <tr>
    <td>
    SYSTEM
    </td>
    <td align="right">
    268
    </td>
    <td align="right">
    500
    </td>
    <td align="right">
    54
    </td>
    Is this any settings issue or anything to be modified in the script.Could you please reply..
    Regards,
    Bharath.
    Edited by: 870384 on Jul 6, 2011 1:17 AM

    Hi Sven W,
    Please find the sql below that is generating the tablespace usage report. In the staring of the script markup is set to ON and at the end it is set to OFF.Do you suggest any changes to this..?
    SET ECHO OFF
    SET PAGES 999
    SET MARKUP HTML ON SPOOL ON
    col tablespace_name format a15 trunc
    col cur_use_mb for 999999999
    col cur_sz_mb for 999999999
    col free_space_mb for 999999999
    col max_sz_mb for 999999999
    compute sum of cur_use_mb on report
    compute sum of cur_sz_mb on report
    compute sum of free_space_mb on report
    compute sum of max_sz_mb on report
    break on report
    spool tablespace.html
    select tablespace_name,
    round(sum(total_mb)-sum(free_mb),2) cur_use_mb,
    round(sum(total_mb),2) cur_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(total_mb)*100) cur_prct_full,
    round(sum(max_mb) - (sum(total_mb)-sum(free_mb)),2) free_space_mb,
    round(sum(max_mb),2) max_sz_mb,
    round((sum(total_mb)-sum(free_mb))/sum(max_mb)*100) overall_prct_full
    from (select tablespace_name,sum(bytes)/1024/1024 free_mb,0 total_mb,0 max_mb from DBA_FREE_SPACE group by tablespace_name
    union select tablespace_name,0 current_mb,sum(bytes)/1024/1024 total_mb,sum(decode(maxbytes, 0, bytes, maxbytes))/1024/1024 max_mb
    from DBA_DATA_FILES group by tablespace_name) a group by tablespace_name;
    select owner,segment_name,segment_type,bytes/(1024*1024) size_m
    from dba_segments
    where tablespace_name = 'SYSTEM' and segment_name='FGA_LOG$' order by size_m desc;
    spool off;
    SET MARKUP HTML OFF SPOOL OFF

  • Problem parsing XML with schema when extracted from a jar file

    I am having a problem parsing XML with a schema, both of which are extracted from a jar file. I am using using ZipFile to get InputStream objects for the appropriate ZipEntry objects in the jar file. My XML is encrypted so I decrypt it to a temporary file. I am then attempting to parse the temporary file with the schema using DocumentBuilder.parse.
    I get the following exception:
    org.xml.sax.SAXParseException: cvc-elt.1: Cannot find the declaration of element '<root element name>'
    This was all working OK before I jarred everything (i.e. when I was using standalone files, rather than InputStreams retrieved from a jar).
    I have output the retrieved XML to a file and compared it with my original source and they are identical.
    I am baffled because the nature of the exception suggests that the schema has been read and parsed correctly but the XML file is not parsing against the schema.
    Any suggestions?
    The code is as follows:
      public void open(File input) throws IOException, CSLXMLException {
        InputStream schema = ZipFileHandler.getResourceAsStream("<jar file name>", "<schema resource name>");
        DocumentBuilderFactory factory = DocumentBuilderFactory.newInstance();
        DocumentBuilder builder = null;
        try {
          factory.setNamespaceAware(true);
          factory.setValidating(true);
          factory.setAttribute(JAXP_SCHEMA_LANGUAGE, W3C_XML_SCHEMA);
          factory.setAttribute(JAXP_SCHEMA_SOURCE, schema);
          builder = factory.newDocumentBuilder();
          builder.setErrorHandler(new CSLXMLParseHandler());
        } catch (Exception builderException) {
          throw new CSLXMLException("Error setting up SAX: " + builderException.toString());
        Document document = null;
        try {
          document = builder.parse(input);
        } catch (SAXException parseException) {
          throw new CSLXMLException(parseException.toString());
        }

    I was originally using getSystemResource, which worked fine until I jarred the application. The problem appears to be that resources returned from a jar file cannot be used in the same way as resources returned directly from the file system. You have to use the ZipFile class (or its JarFile subclass) to locate the ZipEntry in the jar file and then use ZipFile.getInputStream(ZipEntry) to convert this to an InputStream. I have seen example code where an InputStream is used for the JAXP_SCHEMA_SOURCE attribute but, for some reason, this did not work with the InputStream returned by ZipFile.getInputStream. Like you, I have also seen examples that use a URL but they appear to be URL's that point to a file not URL's that point to an entry in a jar file.
    Maybe there is another way around this but writing to a file works and I set use File.deleteOnExit() to ensure things are tidied afterwards.

  • Text in internal table with HTML tags.

    Hi ,
    I have Text in internal table with HTML tags.
    The text has to be shown in output of smartform as formatted text.
    That is the smartform should READ the HTML TAGS , convert the text accordingly and show in the output as formatted text.
    I dont want to make a webform . This is for NORMAL SPOOL output and NOT for WEB OUTPUT.
    IN SHORT
    :- the text in the internal table is like this ( please ignore the dot in the HTML TAG )--
    <html><.U>this is heading</.U>Line with no break<.br>some content text</.br>
    </html>
    OUTPUT
    <U>this is heading</U>Line with no break<br>some content text</br>
    1)  Can I can get the output and store it as text in a string variable and show in the smartform  ?
    In this case I want to know how to convert  and store in a variable  in sap .
    OR
    2) Can the text element convert the text with HTML TAGS to html formatted output and show it ?
    Regards,
    Jagat

    Hi,
    Use the FM SCP_REPLACE_STRANGE_CHARS and check
    See the
    Converting html special characters to plain characters (e.g. u00FC to u00FC)

  • Importing XML with html style tags

    I have an xml with an element <description> that contains some styling like, <em> or <b>. What do I need to do in order for me to import the xml into ID and see the italicized words?
    I appreciate any help.

    I have an xml with an element <description> that contains some styling like, <em> or <b>. What do I need to do in order for me to import the xml into ID and see the italicized words?
    I appreciate any help.

  • Parsing errors with CDATA tags using oracle xml parser v2

    I'm using the oracle.xml.parser.v2 parser to combine a
    generated xml document from a database with a static
    xsl file to produce html. Within the xml document, there
    are fairly large CDATA sections (500 lines) which happen
    to contain javaScript.
    Occasionally, I'm getting xml tags in the final html
    document! It seems that the oracle parser pukes
    on a certain type of data within a CDATA tag, and then
    replaces an angle bracket (<) of a tag with a #60. This
    can cause html tags being viewed in the document. At
    first, I thought the amount of JavaScript within the
    CDATA tag was too large for the parser to handle,
    because when I split it up into 2 or more parts the errors
    went away. But, re-arranging the JavaScript (String in the CDATA tag)
    can make the errors disappear. And, if I
    use the Saxon parser to manually combine the xsl with
    the xml, the output is fine. If anyone knows that this is
    a confirmed bug by Oracle, or any other relevant info on
    this, please let me know.

    Hi,
    Your lucky, i've just finished a project that used the oracle parser extensively.
    I think the problem may stem from your xsl. Although your cdata tags may be well formed, in the xsl you might need to escape the text again, this may mean that the xsl needs to print a further cdata tag around the data. This is because the parser (well the version I was using) strips the cdata tags before the transformation happens.
    This is the probably the cause of the nasty html output.

  • Recordset xml export WITH html tags

    Hi there,
    I am trying a rather simple thing (I hope) but cannot figure it out how to do it.
    I created a dynamic xml (.php) file using the export recordset as xml behaviour. The generated xml works fine when I use spry to display it. The downside is that html tags are converted to something like this (I understand that these are the greater then and lesser then signs used in html):
    <strong>fringilla</strong>
    In the html document where I use spry to display this xml, the < etc are converted back to <  and >, but the html is not rendered.
    I tried cdata, but somehow cannot get this to work. I also cannot get dsSpecials.setColumnType("quote_tekst", "html"); to render the xml as correct html.
    Can someone tell me how to do this? Database and xml are both utf-8.
    Kind regards and big thanks in advance if you can help (it is really appreciated ;-D),
    Ben

    Sorry about that, don't know what happened in that last post..formatting I guess, here's the whole reply - xml enclosed w/ a pre - thanks again.<br /><br />Hi Günter,<br /><br />Thanks so much for the info.  I have been diligently trying to use CDATA and read the generated XML, but still I'm not seeing the HTML text rendereed in my detail section.<br /><br />The XML is setup from my mySQL data as:<br /><pre> <br /><?xml version="1.0" encoding="UTF-8"?><br /><CurrentSpecials><br />     <special><br />          <name> Caribbean Sun </name><br />          <detail> <h1>special deal!!</h1><p style="color:#00f;"><strong>Join us</strong>!</h1> </detail><br />          <expire> 2007-08-31 00:00:00 </expire><br />          <rating> highest </rating><br />     </special><br />...<br /></pre><br />and I want the detail to render in my div (or I'll add a table/textarea...) as the html indicates.  I'm not having any luck w/ using CDATA for it - it's probably just me - I'm just starting out with this stuff.  Any pointers in the right direction? I'm getting the detail as {dsList:detail} and somehow need to say - this is html.  I've tried using javascript and php to render it.<br /><br />I could I guess just echo the detail on a mouseclick without a spry but didn't want to have to do all the implementation myself - I wanted to take advantage of dreamweaver's functionality! <br /><br />Thanks so much for looking at this - any help is so much appreciated!!

  • Inserting HTML tag for character style

    I want to be able to use the <DEL> HTML tag around some text:
    <p>Regular Price <del>$395</del>  Today $95</p>
    So, it should look like this:
    Regular Price $395 Today $95
    This works reliably in Dreamweaver (both preview and in various browsers). It also works on this forum page! But I can't get it to work in Muse.
    Here is my test site:
    http://musetest-dec152012.businesscatalyst.com/index.html
    I followed the instructions here:
    http://forums.adobe.com/message/4819276#4819276
    This shows how to add a scroll box using HTML. That works on the test site. I then modified the contents to add <DEL> to the second word and it isn't shown. [I also added <STRONG> to the sixth word and it doesn't show either.]
    I followed the instructions here:
    http://forums.adobe.com/message/4399108#4399108
    This shows how to use a character style. The <MARK> style seems to work, but the <STRONG> style doesn't show up in the browser. Any rate, there is no way I can find to add my own tag and the <DEL> tag is not one of those in the pull down list.

    Iain --
    Muse overrides the default styling for the 'del' and 'ins' tags. If you want to use these tags in custom HTML, and have styling applied to them, you'll have to specify the styling you want with inline CSS, like so:
    <p>Regular Price <del style="text-decoration: line-through">$395</del>  Today $95</p>

  • Parsing error in html file for xml

    Can anyone tell me why this code doesn't work?<br /><br /><HitMenus><br /><format bar_color="FFFFFF" bar_alpha="20" divider_color="FFFFFF" mouse_over_color="CCCCCC" text_color="000000" text_hover_color="000000" menu_box_color="FFFFFF" menu_box_alpha="100" header_images="yes"/><br /><link name="About Us" location="http://www.circletfarms.org/../images/" img="toms farm2jpg" mode="url" target="-main"><br /><sublink name="Tom's Story" location="http://www.circletfarms.org/../Promise.html"  mode="url" target="-main"><br /><sublink name="Our Mission" location="http://www.circletfarms.org/../Our Mission.html" mode="url" target="-main"/><br /><sublink name="Tom's Mission" location="http://www.circletfarms.org/../Toms Mission.html" mode="url" target="-main"/><br /><sublink name="Contact Us" location="http://www.circletfarms.org/../Contact Us.html" mode="url" target="-main"/><br /><br /><link><br /><link name="Our Programs" location="http://www.circletfarms.org/../images/programs.jpg" mode="url" target="-main"><br /><sublink name="Overview" location="http://www.circletfarms.org/../Our Programs.html" mode="url" target="-main"/><br /><sublink name="Weaving" location="http://www.circletfarms.org/../art and weaving.html#Weaving" mode="url" target="-main"><br /><sublink name="Art Lessons" location="http://www.circletfarms.org/../art and weaving.html" mode="url" target="-main"/><br /><sublink name="Cooking Classes" location="http://www.circletfarms.org/../cooking and bakery.html" mode="url" target="-main"/><br /><sublink name="Gardening" location="http://www.circletfarms.org/../veggies and herbs.html"  mode="url" target="-main"><br /><sublink name="Bakery" location="http://www.circletfarms.org/../cooking and baking.html#Bakery" mode="url" target="-main"><br /><sublink name="Pottery and Sculpting" location="http://www.circletfarms.org/../pottery shop.html" mode="url" target="-main"/><br /><sublink name="Woodshop" location="http://www.circletfarms.org/../pottery shop.html#Woodshop" mode="url" target="-main"><br /></sublink><br /><link><br /><link name="Important Information" location="http://www.circletfarms.org/../" img="stats.jpg" mode="url" target="-main"><br /><sublink name="Statistics" location="http://www.circletfarms.org/../stats.html" mode="url" target="-main"/><br /><sublink name="Residential Services" location="http://www.circletfarms.org/../stats.html#Growth" mode="url" target="-main"/><br /><sublink name="Aging Caregivers" location="http://www.circletfarms.org/../stats.html#Aging" mode="url" target="-main"/><br /><sublink name="The 317 Plan" location="http://www.circletfarms.org/../stats.html#Plan" mode="url" target="-main"/><br /><br /><link><br /><link name="The Application Process" location="http://www.circletfarms.org/../images/" img="flowers2.jpg" mode="url" target="-main"><br /><sublink name="Application Process" location="app process.html#Application" mode="url" target="-main"/><br /><sublink name="Who Qualifies?" location="http://www.circletfarms.org/../app process.html" mode="url" target="-main"/><br /><sublink name="Who Pays?" location="http://www.circletfarms.org/../app process#WhoPays" mode="url" target="-main"/><br /><br /><link><br /><link name="Our Partners" location="http://www.circletfarms.org/../images/" img="partners.jpg" mode="url" target="-main"><br /><sublink name="Training For Life" location="http://www.circletfarms.org/../training4life.org" mode="url" target="-main"/><br /><sublink name="La Mesa RV" location="http://www.circletfarms.org/../La Mesa RV.html" mode="url" target="-main"/><br /><sublink name="Beaudry RV" location="http://www.circletfarms.org/../Beaudry.html" mode="url" target="-main"/><br /><sublink name="Skedaddle Fundraisers" location="http://www.circletfarms.org/../skedaddle.html" mode="url" target="-main"/><br /><sublink name="Hot Monkey Graphics" location="http://www.circletfarms.org/../hot monkey.html" mode="url" target="-main"/><br /><br /><link><br /><link name="How You Can Help" location="http://www.circletfarms.org/../Images" img="flower1.jpg" mode="url" target="-main"><br /><sublink name="Volunteering" location="http://www.circletfarms.org/../help.html" mode

    Hi, Ranjan.
      First of all, let's look at the meaning of the error.
    > ...Exception: ERROR converting document line no. 2 according to
    > structure 'GL_FileUpload_SAPECC_Header_DT1':java.lang.Exception:
    > ERROR in configuration: more elements in file csv structure than
    > field names specified!
      It seems that XI interpreted 2nd line as
    Header_DT1 not as Item_DT1 that you meant.
    >  GL,GLI,4011,3011,,,,,,AU,600,7000,8000,9000,5000,RK,,,,,,,,,,,,,,,,,,,,
      That's why it says this line has more elements than the structure
    defined(Header_DT1)
      And the reason why XI misinterpreted the above as Header is that
    you used keyFieldValue with the same value.
    > ...Header_DT1.keyFieldValue: GL
    > ...Item_DT1.keyFieldValue: GL
      According to the following help,
    http://help.sap.com/saphelp_nw04/helpdata/en/2c/181077dd7d6b4ea6a8029b20bf7e55/content.htm
    it says like the following.
    Key Field Name
    If you specified a variable number of substructures for Recordset
    Structure, in other words, at least one substructure has the value
    ‘*’, then the substructures must be identified by the parser from
    their content. This means that a key field must be set with different
    constants for the substructures. In this case, you must specify a key
    field and the field name must occur in all substructures.
    How about using different constants for header and item if possible?
    Good luck.

  • Define HTML Tag for Parser - Help?

    Hi all,
    I'm trying to write a program which downloads a HTML script, parses it, extracts the links and checks to see which of these links are broken. While the parser is picking up tags that are well-formed, such as:
    Mark Humphrys -
    Research -
    The HTML script has a few malformed HTML tags such as the following:
    <li><b> References </b>
    <li><b> References </b>
    The snippet of code I'm using to try and get these malformed tags is as follows:
         ParserCallback parserCallback = new ParserCallback()
         public void handleText(final char[] data, final int pos) { }
              Tag a = HTML.Tag("a");
              public void handleStartTag(Tag tag, MutableAttributeSet attribute, int pos)
                   if (tag == a)
                   String address = (String) attribute.getAttribute("href");
                        list.add(address);
                   System.out.println(address);
         public void handleEndTag(Tag t, final int pos) {  }
         public void handleSimpleTag(Tag t, MutableAttributeSet a, final int pos) { }
         public void handleComment(final char[] data, final int pos) { }
         public void handleError(final java.lang.String errMsg, final int pos) { }
         };but I keep getting the error that they can't find the Tag() method. At the start of my code I have:
    import javax.swing.text.html.HTML;
    import javax.swing.text.html.HTML.Tag;so I don't understand why the compiler can't find the method. Is there something wrong with the way I'm using it?
    I have very little experience with this area so any help or pointers would be great!

    Sorry, the exact error message is:
    cannot find symbol,
    symbol: constructor Tag(java.lang.String)
    location: class javax.swing.text.html.HTML.Tag
    HTML.Tag a = new HTML.Tag("a");
    ^
    it should of course be a constructor not a method but the compiler still can't seem to find it. The proper code (in as much as I can tell although it still isn't working)
         ParserCallback parserCallback = new ParserCallback()
         public void handleText(final char[] data, final int pos) { }
              HTML.Tag a = new HTML.Tag("a");
              public void handleStartTag(Tag tag, MutableAttributeSet attribute, int pos)
                   if (tag == a)
                   String address = (String) attribute.getAttribute("href");
                        list.add(address);
                   System.out.println(address);
         public void handleEndTag(Tag t, final int pos) {  }
         public void handleSimpleTag(Tag t, MutableAttributeSet a, final int pos) { }
         public void handleComment(final char[] data, final int pos) { }
         public void handleError(final java.lang.String errMsg, final int pos) { }
         };

  • XML parser to parse XML inside HTML file

    Hi,
    I wish to know is there any other parsers apart from JAXP to parse xml content present inside HTML file. For example,
    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <title></title>
    </head>
    <body>
    <form id="j_id_jsp_1394907664_1" name="j_id_jsp_1394907664_1" method="post" action="/msaiphoneportal1.1c/pages/xmlchech.faces;jsessionid=5666F0E1CF0E44B978940F021012AA41" enctype="application/x-www-form-urlencoded">
    <input type="hidden" name="j_id_jsp_1394907664_1" value="j_id_jsp_1394907664_1" />
    <?xml version="1.0" encoding="UTF-8"?>
    <hospital>
    <Users>
    <User id="1" password="x" type="staff" username="x"/>
    <User id="2" password="y" type="staff" username="y"/>
    <User id="3" password="z" type="staff" username="z"/>
    </Users>
    <Survey/>
    <Patients>staaatus</Patients>
    </hospital>
    <input type="hidden" name="j_id_jsp_1394907664_1:j_id_jsp_1394907664_2" /><input type="hidden" name="javax.faces.ViewState" id="javax.faces.ViewState" value="-4298162632826268059:-1507671971163298623" autocomplete="off" />
    </form>
    </body>
    </html>
    I need to read the XML content inside. Is there any way please let me know
    Edited by: DHURAI on Jul 22, 2010 12:59 AM

    DHURAI wrote:
    while reading, we can fetch the starting of XML through <?xml> tag, but how we know the ending of the XML as it seems to be dynamic.1) Extract the document root element which follows the <?xml ... ?>
    2) From this root element , construct the associated root element terminal by inserting a / after the <.
    3) Search for the terminal.
    If the root name can also be the name of an enclosed element then you will have to count the number of terminals.

Maybe you are looking for

  • Server 3.2.1 update - view_all_user_groups_users_flat not found

    Hey all, I just updated our OS X Server app to 3.2.1 and now I can't log into the Profile Manager web page.  I looked in the log file (/Library/Logs/ProfileManager/profilemanager.log) and it is showing this error every time I try to connect: [4897] [

  • Match code translations

    How to do translations for match code ? Could you please tell in detail, if possible.

  • Facing problem while updating IInfotype 0009-bank details through workflow

    Dear SAP Gurus, I am facing a problem while updating Infotype 0009 through workflow which is integrdated with portal. Scenario: Employee logins to portal and changes his/her bank details like payee name, bank key, account number, postal code and city

  • Tagtool (Audio Tag Tool) doesn't start

    Strange, when I try to start tagtool, this error occurs: I/O warning : failed to load external entity "/home/$user/.tagtoolrc" ** (tagtool:19769): WARNING **: Failed to read preferences file When I create this .tagtoolrc file, it becomes this: /home/

  • [SOLVED]Concerning sirius: some building + PKGBUILD/.SRCINFO questions

    [first from scratch pkgbuild] Hello, I'm so far as I have an *almost* working (only dummy package() function yet) PKGBUILD (link; plain) for sirius , sadly the build itself won't work, as it fails with a python syntax error, eg: if prot <> 'public':