Extracting XML as text with markup; shortcut ?

Hi,
I just wanted to know that i want the DOM object as a string/text with markup. I saw ur answer but do we have a shortcut method in the oracle parser which provide this functionality; Converting the DOm into markup text. There is a method in XMLNSNode as getText() but this eliminates the markup , i want the text with markup. Give me a short cut ?.
Have a nice day,
Osman

Not sure if this is what you want but if you want to convert your XML document to text string do the following:
XMLDocument YourDocument;
/* Parse and Make Mods */
StringWriter sw = new StringWriter();
PrintWriter pw = new PrintWriter(sw);
YourDocument.print(pw);
String YourDocInString = sw.toString();
taken from XML Application Developer's Guide page 17-82

Similar Messages

  • How can I extract XML from a text document?

    I have tons of text documents containing useless text and a section of XML. I would like to use either Mac Automator or Apple Script to pull the XML section out and place it in a new document with a .xml extension. How can I do that?
    Here is a sample of the XML section that I need to pull:
    - ---Start ACNS XML
    <?xml version="1.0" encoding="UTF-8"?>
    <Infringement xsi:schemaLocation="http://www.movielabs.com/ACNS/ACNS2v1.xsd" xmlns="http://www.movielabs.com/ACNS" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">           <Case>
    <ID>22242387629</ID>
    <Status>OPEN</Status>
    <Severity>Normal</Severity>
    </Case>
    <Complainant>
    <Entity>MPAA Search and Notify</Entity>
    <Contact></Contact>
    <Address></Address>
    <Phone>5555555555</Phone>
    <Email>[email protected]</Email>
    </Complainant>
    <Service_Provider>
    <Entity>Some Place, Somewhere</Entity>
    <Contact></Contact>
    <Address>Some Place, Somewhere  </Address>
    <Phone></Phone>
    <Email>[email protected]</Email>
    </Service_Provider>
    <Source>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <IP_Address>127.0.0.1</IP_Address>
    <Port>64153</Port>
    <Type>P2P</Type>
    <SubType BaseType="P2P" Protocol="BitTorrent" />
    <UserName></UserName>
    <Number_Files>1</Number_Files>
    </Source>
    <Content>
    <Item>
    <TimeStamp>2011-12-02T23:41:59.94Z</TimeStamp>
    <AlsoSeen Start="2011-12-02T23:40:00.11Z" End="2011-12-02T23:41:59.94Z"></AlsoSeen>
    <Title>asdfasdf (2011)</Title>
    <Artist></Artist>
    <FileName>asdfasdf (2011) DVDRip XviD-MAXSPEED</FileName>
    <FileSize>1580908467</FileSize>
    <Type>Video</Type>
    <Hash Type="SHA1">8FB7B1F4984AB6E0746B43D2B82D4ED8102984D5</Hash>
    </Item>
    </Content>
    <History></History>
    <Notes></Notes><Type Retraction="false">DMCA</Type>
    <Detection>
    <Asset>
    <OriginalAssetName>asdfasdf (2011)</OriginalAssetName>
    </Asset>
    <ContentMatched Audio="false" Video="true" Text="false" />
    <HashMatched>true</HashMatched>
    <VerificationID>Manual and automated watermark verification</VerificationID>
    </Detection>
    <Verification>
    <VerificationLevel Type="DT">2</VerificationLevel>
    </Verification>
    <TextNotice><![CDATA[12-03-2011

    XML portion always starts with <Infringement and ends with </Infringement>.
    Actually, it doesn't... the XML starts with the <?xml> tag, but that's just me being pedantic
    Given what you've said, though, it's easy to extract the XML data from a given block of text.
    First, read the source data:
    set theText to read file "path:to:the:file"
    Then you can extract the XML via something like:
    set start_tag to "<?xml"
    set end_tag to "</Infringement>"
    set start_of_data to offset of start_tag in theText
    set end_of_data to (offset of end_tag in theText) + (-1 + (length of end_tag))
    set theXML to text start_of_data through end_of_data of theText
    Now you can write that data to a file:
    set theFile to open for access file ((path to desktop as text) & "output.xml" as text) with write permission
    set eof theFile to 0
    write theXML to theFile starting at 0
    close access theFile
    If you have multiple files you can either run this in a loop that iterates over the files, or save the script as a droplet, then drop the files onto the script icon. Let me know if you need help with that, too.

  • How to create a xml element for Text with Java?

    Hi @ all,
    I want to tag a part of a text with Java.
    Like the InDesign function "Tag für Text" (maybe "tag for text" in english)
    Is there a way to tag text with Java?
    I tried to autoTag and to markup the text with an existing xml, but only got IdsExceptions.
    here the code where to tag the text:
    XMLElement newXML = parentXML.addXMLElement(VariableTypeUtils.createString("newXML"),OptArg.noVariableType());
    Text[] texts = para.findText(OptArg.noBoolean());
    for (Text text : texts)
       //TODO tag text
    Exception throwing code:
    text.autoTag();
    text.markup(newXML);
    newXML.markup(VariableTypeUtils.createObject(text));

    This is not a Web Dynpro specific question. This forum is for Web Dynpro specifc development aspects. There are other forums for general ABAP development as well as other specific aspects of ABAP development.
    I strong suggest that you review the rules of engagement for forum involvement, Derek.  You have had multiple violations of the rules in the last week.

  • How to assign to variable from XML type values with extract function?

    Hi ,
    I have XMLTYPE variable LeXml having below record
    <?xml version="1.0" encoding="utf-8"?>
    <soap:Envelope xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" xmlns:soap="http://schemas.xmlsoap.org/soap/envelope/">
    <soap:Body>
    <AddListing xmlns="http://www.christielites.com/">
    <sComCode>string</sComCode>
    <sLocCode>string</sLocCode>
    <dStart>dateTime</dStart>
    <dEnd>dateTime</dEnd>
    <sEcode>string</sEcode>
    <iAvail>int</iAvail>
    <iOwned>int</iOwned>
    <sPostTrans>string</sPostTrans>
    </AddListing>
    </soap:Body>
    </soap:Envelope>
    I want to get sEcode value string into one varialbe using extract function or alternate?
    can any one give me syntax fro it?
    I tried with Mstring:=LeXml.extract('AddListing/scomcode/text()').getStringval(); but iam getting error
    ERROR at line 1:
    ORA-31011: XML parsing failed
    ORA-19202: Error occurred in XML processing
    LPX-00601: Invalid token in: 'soap:Envelope/text()'
    ORA-06512: at "SYS.XMLTYPE", line 111
    ORA-06512: at "BLUEWATER.CREATELERESPONSELOG", line 12
    ORA-06512: at line 1
    Please guide Me..

    Hi Ravi kumar,
    I have similar type of problem like above . My xml file is like below:
    <doSingleRecordResponse xmlns="urn:mdWebService">
    <doSingleRecordResult xsi:type="ResponseRecord" id="1" version="2.30" action="Response" timeout="10" timestamp="12-17-2009" transmissionReference="ABCDEF" TimeToProcess="31.25" xmlns:xsi="http://www
    .w3.org/2001/XMLSchema-instance">
    <CustomerCredentials>
    <CustomerID>111111</CustomerID>
    </CustomerCredentials>
    <ServiceResult>
    <ErrorCode> </ErrorCode>
    <ErrorDesc>OK;</ErrorDesc>
    </ServiceResult>
    <Address version="2.30">
    <Faults count="0"/>
    <Result>
    <ErrorCode> </ErrorCode>
    <ErrorDesc>OK</ErrorDesc>
    <StatusCode>9</StatusCode>
    <StatusD
    esc>(U.S.) The address was fully coded.</StatusDesc>
    </Result>
    <Company/>
    <Urbanization>
    <Name/>
    <Code/>
    </Urbanization>
    <Type>
    <String>Highrise</String>
    <Code>H</Code>
    </Type>
    <Street>XXXXXXXXXXXXX</Street>
    <Street2/>
    <Suite/>
    <PrivateMailBox/>
    <CarrierRoute>C048</CarrierRoute>
    <Lacs> </Lacs>
    <LacsLink>
    <LacsStatusCode/>
    <LacsReturnCode/>
    </LacsLink>
    <DeliveryPointCode>99</DeliveryPointCode>
    <DeliveryPointCheckDigit>6</DeliveryPointCheckDigit>
    <DPV>
    <Footnotes/>
    <CMRA/>
    <AddressStatus/>
    </DPV>
    <DeliveryIndicator>
    <Code/>
    </DeliveryIndicator>
    <City>
    <Name>String</Na
    me>
    <Abbreviation>Memphis</Abbreviation>
    </City>
    <County>
    <Name>String</Name>
    <Fips>41111</Fips>
    </County>
    <State>
    <Name>Tennessee</Name>
    <Abbreviation>TN</Abbreviation>
    </State>
    <Zip>
    <Type> </Type>
    <Zip5>38111</Zip5>
    <Plus4>1111</Plus4>
    </Zip>
    <GeoCode>
    <Latitude/>
    <Longitude/>
    </GeoCode>
    <TimeZone>
    <Name/>
    <Code/>
    </TimeZone>
    <Msa>
    <Code/>
    </Msa>
    <Pmsa>
    <Code/>
    </Pmsa>
    <Census>
    <Block/>
    <Tract/>
    </Census>
    <CongressionalDistrict>
    <Code/>
    </CongressionalDistrict>
    <Parsed>
    <StreetName/>
    <AddressRange/>
    <Suffix/>
    <Direction>
    <Post/>
    <Pre/>
    </Direction>
    <Suite>
    <Name/>
    <Range/>
    </Suite>
    <PrivateMailBox>
    <Name/>
    <Range/>
    </PrivateMailBox>
    <Garbage/>
    </Parsed>
    <Country>
    <Abbreviation>US</Abbreviation>
    <Name>United St
    ates of America</Name>
    </Country>
    </Address>
    <Telephone version="" action="">
    <Result>
    <ErrorCode/>
    <ErrorDesc/>
    <StatusCode/>
    <StatusDesc/>
    </Result>
    <Number/>
    <PhoneAreaCode/>
    <NewAreaCode/>
    <Prefix/>
    <Suffix/>
    <Extension/>
    <City>
    <Name/>
    </City>
    <State>
    <Name/>
    <Abbreviation/>
    </State>
    <GeoCode>
    <Latitude/>
    <Longitude/>
    </GeoCode>
    <TimeZone>
    <Name/>
    <Code/>
    </TimeZone>
    <Msa>
    <Code/>
    </Msa>
    <Pmsa>
    <Code/>
    </Pmsa>
    <County>
    <Name/>
    <Fips/>
    </County>
    <Country>
    <Abbreviation/>
    <Name/>
    </Country>
    </Telephone>
    <Name version="" action="">
    <Result>
    <ErrorCode/>
    <ErrorDesc/>
    <StatusCode/>
    <StatusDesc/>
    </Result>
    <Company/>
    <Prefix/>
    <Suffix/>
    <Full/>
    <First/>
    <Middle/>
    <Last/>
    <Gender/>
    </Name>
    </doSingleRecordResult>
    </doSingleRecordResponse>
    This is the response i got from a webservice , from this i need to extract customer id .
    I tried like this :
    response := UTL_DBWS.invoke ( l_call,request);
    if RESPONSE.extract('/doSingleRecordResponse/doSingleRecordResult/CustomerCredentials/CustomerID/text()','xmlns:xsi="http://www
    .w3.org/2001/XMLSchema-instance" xmlns="urn:mdWebService"') is not NULL
    then
    errorcode :=RESPONSE.extract('/doSingleRecordResponse/doSingleRecordResult/CustomerCredentials/CustomerID/text()','xmlns:xsi="http://www
    .w3.org/2001/XMLSchema-instance" xmlns="urn:mdWebService"').getStringVal;
    end if;
    I am getting null value into errorcode,
    Can youplease let me know what i am doing wrong?
    Thanks

  • Extract text with specific format ?

    Hello,
    Is there a way to extract text with a specific format in a document (i.e. font type/ size or even font colour)?
    thanks in advance!

    Hello gillad,
    I am afraid only indicators are the bold font or text colour...
    Having said that, just as I was writting my response, the following idea came to me:
    Convert the pdf into word
    Click on text of interest (text with distinct format)
    Use the feature "select all text with similar formating (no data)" under "editing" within the "home" ribbon
    Having said that, hopefully a tool set/ action can be developed one day...

  • Pretagging text with ID styles without using XML tags

    I just wanna pretag some text with ID styles, such that when I place the text, it joins the layout already formatted.
    But how? Can I do this without drinking from the XML cup?
    Thx.

    Many thanks for your reply.<br /><br />When I export tagged copy (either verbose or abbreviated methods), the resulting text document is complex -- all kinds of coding. Yet, when placed back into ID, it appears correctly formatted.<br /><br />But my attempts to pretag new text with, say, <ParaStyle:New subsubcat> (one of the exported tags), brings in the tag itself, not correctly formatted new text. What to do?<br /><br />I was unable to locate the PDF document about tagged text that you referenced. My upgrades are downloads, not discs.<br />Any further suggestions on where to find the PDF document.<br /><br />Thanks again.

  • How to extract xml tag name contains dashes

     
    Hi, How to parse XML file to extract root tag contains dashes in Flex,for example
    XML Input is: <regular-body>Text of my post...</regular-body>
    expected output is : regular-body
    I appreciate any of your suggestions or inputs

    Do you want to get the name of the XML ELEMENT regular-body, or the value in the XML file "Text of my post...".
    If its the latter, then you could use the bracket/quote notation for extracting the value, like in the following example:
    image = xmlWeather[0]..parameters["conditions-icon"]["icon-link"][idx]
    I use this when parsing weather information from a 3rd party in which their XML is loaded with dashes.
    If you are looking to get the actual element name, not sure how to do that.  I would think that if you are using an XML file, you would have at least the high level element known.

  • Easiest and/or best methods for generating XML output (not with a report)

    Hi, several of our EBS customers (11.5.10) are converting their PDF reports to use XML/BI publisher to produce output. The data stream comes from a report that generates the XML output, and then the XML template is applied. This works great ... no problems, etc. From what I have read, however, Oracle intends to treat the traditional Forms and Reports Developers as legacy tools (although still supporting them, of course).
    My question is if I wanted to ditch using Reports to generate XML output, what, in your opinion or in your current usage, is the easiest way of getting this data? In Reports, the data modeler is excellent in providing a method to write your queries, split them into different repeating groups, write formula and summary columns, link multiple queries, etc, etc. If one were to become Reports Developer free, what comparable tools are available to take its place? I would expect this tool to handle a mix of GUI and coding like the Reports data modeler. Please note that I'm not looking for an EBS-specific solution -- say for a custom application using regular Oracle 10g DB and iAS, with BI Publisher for reporting.
    Thanks for your feedback,
    Ryan

    What I'm looking for is to not use Oracle Reports to generate the XML data output since Oracle's statement of direction is pushing BI Publisher rather than Oracle Reports as the preferred tool for reporting. That said, the data modeler in Reports provides a very flexible tool to construct and link multiple queries and to manipulate the queries into several levels of a master/detail relationship. Further, the mix of GUI and coding makes setting up the data model a lot more efficient. What I'm looking for (and I don't know if anything exists) is something comparable that can be used to generate XML output from the DB -- the idea being that I wouldn't use legacy tools, like Reports, for this task. I hope that is clearer.
    Really, another way of answering my question is, aside from Reports and the APIs mentioned so far, what are my fellow developers using, if anything, to extract XML data in a way that handles the features i list above?

  • Re-Using XML file from decode barcode + extract xml process

    I was hoping someone could put me in the right direction here. I am decodeing the information stored in a 2D Bar code and sending this information to an XML file, then I am trying to combine that xml file with a blank PDF template but the process is failing beacuse there are some additional tag fields the XML data from the  Decode->Extract XML process.
    The XML file from the decode process gives the structure below..notice therer some extra tags (lines 2- 4)
    <?xml version="1.0" encoding="UTF-8"?>
    <xdp:xdp xmlns:xdp="http://ns.adobe.com/xdp/" xmlns:xfa="http://www.xfa.org/schema/xfa-data/1.0/">
    <xfa:datasets>
    <xfa:data>
    <form1>
    The XML structure that is expected by the PDF template is as follows
    <?xml version="1.0" encoding="UTF-8"?>
    <form1>
    So the xml output of the Decode barcode + Extract XML process has three extra lines of tag. Is there a way I could use a process within liveCycle to clean out those three lines in real-time before sending the xml to be recombined with the PDF template.
    Thanks

    Hi,
    What you may do is to use the SetValue and its xpath builder functions to "serialize" the xml into string, "substring" to remove the extra tags, and "concat" to add the extra tags and then "deserialize" it again to an xml to be merged with your form.
    Greetings,
    Yasser

  • Error in creating XML photo gallery with Flash CS4 and AS 3.0

    Hello, all. I've been creating an XML photo gallery with Flash CS4 and AS 3.0 following a tutorial. I followed the instructions step-by-step but at the end I got the following error message instead:
    Error #2044: Unhandled IOErrorEvent:. text=Error #2035: URL Not Found.
    Could anyone in the community assist me as to how to solve the problem? The script has no errors and last time I checked all the applicable files (the .xml file, the .jpg files, the .swf and the .fla file) are in my Documents folder on the Mac.
    Looking forward to your suggestions!

    Check the folder structure
    Flash is not able to get some file thats why the IO Error.
    trace the url path just before u load the file and u will be abel to find whether that file is in specified folder or not.
    http://www.darshanrane.com

  • XML Data Set with Spry Slides - Please Help

    Hi, I'm trying to combine XML Data Set with sliding tabs.
    I've created two keys responsible for sliding the tabs:
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    Then XML Data Set is used to populate the tabs, but only a
    single tab remains visible, and a "Next/Previous" buttons are used
    to move to the next tab. And this is where the problem arises.
    The problem is that, every time I refreash the gallery or
    load it for the first time, I have to press TWICE the "Next" button
    to move to the next image. After that, its all fine, and slides
    well. It's only the FIRST time when loaded.
    Please help.
    Here's the full code:
    <div id="images_gal" >
    ///////////////////////////////////////// The menu - the
    culprit///////////////////////////////////////////
    <div id="menu_next">
    <a id="previous" href="#"
    onclick="sp1.showPreviousPanel();">Previous</a>
    <a id="next" href="#"
    onclick="sp1.showNextPanel();">Next</a>
    </div>
    //////////////////////////////////////// The Sliding Panels
    Gallery ////////////////////////////////////////////////////
    <div id="example2" class="SlidingPanels" tabindex="0" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsSpecials">
    <div spry:repeat="dsSpecials" id="{first}"
    class="SlidingPanelsContent{second}"><div class="top_gal"
    ></div><div class="main_gal"><img
    src="images/Galery/{third}" alt="Digital_Signage" width="600"
    height="304" />
    <p class="screen_gal"><a href="#"
    onclick="MM_openBrWindow('film1.html','Coloris','width=340,height=260,
    top=250, left=250')">CLICK TO VIEW</a></p>
    </div><div
    class="bottom_gal"></div></div>
    </div>
    </div>

    Anyone has any idea why I need a DOUBLE Click to start moving
    the sliding panels?
    I've just completed two tutorials by Don Booth.
    1/Building a Spry Sliding Panels widget
    2/Building a photo album with the Spry framework
    But what I try to COMBINE them - display the photos in
    sliding panels, I also need to DOUBLE click the "next" buton before
    it starts scrolling.
    Why is that Double Click needed? Help Please.
    Here's my code for the combined version:
    <!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>
    <meta http-equiv="Content-Type" content="text/html;
    charset=utf-8" />
    <title>Untitled Document</title>
    <style type="text/css">
    a {
    position:relative;
    left:23px;
    top:127px;
    z-index:10000;
    color: #FF0000;
    </style>
    <script type="text/javascript"
    src="photo_album_samples/includes/xpath.js"></script>
    <script type="text/javascript"
    src="photo_album_samples/includes/sprydata.js"></script>
    <script type="text/javascript"
    src="Spry/SprySlidingPanels.js"></script>
    <link type="text/css" rel="stylesheet"
    href="Spry/SprySlidingPanels.css">
    </head>
    <body>
    <div >
    <a href="#" onclick="sp1.showPreviousPanel();">Previous
    Panel</a>
    <a href="#" onclick="sp1.showNextPanel();" >Next
    Panel</a>
    </div>
    <div id="panelwidget" class="SlidingPanels" >
    <div class="SlidingPanelsContentGroup"
    spry:region="dsGallery" >
    <div spry:repeat="dsGallery" class="SlidingPanelsContent"
    id="p1"><img
    src="photo_album_samples/thumbnails/{@thumbpath}"/></div>
    </div>
    </div>
    <script type="text/javascript">
    var dsGallery = new
    Spry.Data.XMLDataSet("photo_album_samples/photos.xml",
    "gallery/photos/photo");
    </script>
    <script type="text/javascript">
    var sp1 = new Spry.Widget.SlidingPanels("panelwidget");
    </script>
    </body>
    </html>

  • Problems in XML to text

    I'm using Xalan to perform XSLT from XML to text file.
    As I need to format the text file with carriage return at the end of every string pattern produced, I declare a variable in my XSL as a new-line character.
    It works fine if I use a XSLT GUI tool (based on MS Parser SDK) but not using Xalan parser in my Java program. Somehow the newline charache
    Here is a portion of my sample Java program:
    TransformerFactory tFactory = TransformerFactory.newInstance();
    Transformer oTransformer = tFactory.newTransformer(new StreamSource(new File("C:\\actions\\transform\\", sXSLFilename)));
    StreamSource oXMLSource = new StreamSource(
    new StringReader(new String(aData)), "C:\\xslt\\OFT_COMP.dtd");
    StreamResult oResult = new StreamResult(oStrWriter);
    oTransformer.setOutputProperty(OutputKeys.METHOD, "text");
    oTransformer.setOutputProperty(OutputKeys.ENCODING, "ISO-8859-1");
    oTransformer.setOutputProperty(OutputKeys.INDENT, "no");
    oTransformer.transform(oXMLSource, oResult);
    aOutputXMLData = oStrWriter.toString().getBytes();
    Does anybody know what's the problem? Or any other suggestions on performing this kind of "newline" separator?
    Thanks in advance.

    easiest just use a stylesheet to transform the xml to text... and use:
    <xsl:text>&#10;</xsl:text>
    for carriage return

  • Preview - Highlight Text Color - Keyboard Shortcut

    Hi!
    I've loving the markup capabilities of Preview in Mountain Lion and was wondering if there was a way to quickly change colours (colors) of the highlighted text via keyboard shortcut?
    I found this thread for Snow Leopard, but couldn't figure out how to get it to work for Mountain Lion:
    https://discussions.apple.com/thread/3180984?start=0&tstart=0
    It seems there are some shortcuts possible, for instance when I click the Markup dropdown box if I type "g" it will highlight Green, "b" it will select Blue etc.  But it won't actually select these options.
    The quickest way I've found is the right-click after highlighting which brings up a contextual menu to select the colour of that highlight. 
    Ideally I'd press a shortcut combination to change the highlight colour before selecting what to highlight.  Does anyone know of a way to get this functionality?
    Thanks so much for your help! =)
    Derek.

    Check out this article: http://support.apple.com/kb/PH3957?viewlocale=en_US&locale=en_US
    and do as explained in the link you posted yourself.
    Worked for me by adding shortcuts from General settings-->Keyboard-->Shortcuts and define them for Preview.

  • Extract XML from an XML File

    Hi All,
    I have an xml file from which data has to be extracted and inserted into table. XML file looks like this..
    <?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <!DOCTYPE labels SYSTEM "label.dtd">
    <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017">
    <label>
    <variable name= "ITEM">PM191_JTEST</variable>
    <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
    <variable name= " LOT ">ja28-10</variable>
    <variable name= "QUANTITY">1</variable>
    </label>
    </labels>
    In the above xml, if i remove <!DOCTYPE labels SYSTEM "label.dtd"> and use the below query, I am able to get the details.
    SELECT EXTRACTVALUE(VALUE(x), 'labels/@_FORMAT') format
    ,EXTRACTVALUE(VALUE(x), 'labels/@_QUANTITY') QUANTITY
    ,EXTRACTVALUE(VALUE(x), 'labels/@_PRINTERNAME') PRINTERNAME
    ,EXTRACTVALUE(VALUE(x), 'labels/@_JOBNAME') JOBNAME
    FROM (SELECT XMLTYPE
    ('<?xml version="1.0" encoding="UTF-8" standalone="no"?> <labels FORMAT="Harvest Label for Lot Project" QUANTITY="1" PRINTERNAME="PFP3400E006" JOBNAME="JA272017"> <label> <variable name= "ITEM">PM191_JTEST</variable> <variable name= "ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable> <variable name= " LOT ">ja28-10</variable> <variable name= "QUANTITY">1</variable> </label> </labels>' ) xml
    FROM DUAL),
    TABLE(XMLSEQUENCE(EXTRACT(xml, 'labels'))) x
    But <!DOCTYPE labels SYSTEM "label.dtd"> tag is there means then i am getting error as
    Invalid resource handle or path name "/label.dtd"
    Please let me know how we can parse the xml and insert into table. OR how can i remove <!DOCTYPE labels SYSTEM "label.dtd"> tag and process it further.
    Thanks and Regards,
    Mahesh
    Edited by: magu on Sep 2, 2009 3:15 PM
    Edited by: magu on Sep 2, 2009 3:16 PM

    I don't understand why the DOCTYPE is in the XML, but it appears that Oracle is trying to resolve label.dtd to a registered resource. As you discovered, it may be easier to remove the DOCTYPE from the XML then try to register the label.dtd resource within Oracle. To do this, some options are
    - Use the REPLACE command
    - treat the data as a CLOB and instr/substr to build a new clob without the DOCTYPE tag in it.
    - Use the REGEXP_REPLACE command
    Also, if your DB version supports XMLTable, here is the way to do it with that.
    SELECT *
      FROM XMLTABLE('/labels'
                    PASSING XMLTYPE('<?xml version="1.0" encoding="UTF-8" standalone="no"?>
    <labels _FORMAT="Harvest Label for Lot Project" _QUANTITY="1" _PRINTERNAME="PFP3400E006" _JOBNAME="JA272017">
         <label>
              <variable name="ITEM">PM191_JTEST</variable>
              <variable name="ITEM_DESC">6 Pack Blue Assembled 2004 JTEST</variable>
              <variable name=" LOT ">ja28-10</variable>
              <variable name="QUANTITY">1</variable>
         </label>
    </labels>
                    COLUMNS
                    format    VARCHAR2(15) PATH '@_FORMAT',
                    quantity  VARCHAR2(15) PATH '@_QUANTITY',
                    printername  VARCHAR2(15) PATH '@_PRINTERNAME',
                    jobname  VARCHAR2(15) PATH '@_JOBNAME');

  • Internet Explorer 9 doesn't display XML Report Text

    I have just updated reasently to Internet Explorer 9 and now all of my XML Reports do not show the report text.  I've attached a pic where you can plainly see the report test in TestStand but not in IE9.
    The other intresting thing is if the XML is on one of our company network drives it displays fine just not if opened from the local drive.
    Any ideas?
    Solved!
    Go to Solution.
    Attachments:
    ReportText.png ‏150 KB

    Paul -
    This is a known issue that will be fixed in the TestStand 2010 maintenance release. If you'd like to workaround this issue by modifying the XML style sheet for your report without using the Compatibility option that you found in IE9, follow these steps.
    If using a default style sheet, save a copy with a different name to preserve the original file.
    Open the style sheet in a text or code editor.
    Search for node.firstChild.text by using the Find tool in your editing environment.
    Replace the line:
                var text = node.firstChild.text;
    with:
                var valueChildNode = node.selectSingleNode("Value");
         var text = "";
         if (valueChildNode)
           text = valueChildNode.text;
         else
           text = node.text;
    Search for Error:  by using the Find tool in your editing environment.
    Replace the line:
               Error: <xsl:value-of disable-output-escaping="yes" select="user:RemoveIllegalCharacters(.)"/>
    with:
               Error: <xsl:value-of disable-output-escaping="yes" select="user:RemoveIllegalCharacters(ErrorText)"/>
    Save the new version of the style sheet.
    Open TestStand and go to Configure»Report Options...
    In the Contents tab, change the style sheet to point to your updated version.
    Run a sequence that you expect to populate the Report Text.
    Open the generated XML report in IE9 and verify that the Report Text is properly populated.
    Hope this helps.
    Manooch H.
    National Instruments

Maybe you are looking for