Ignore xml tags
Hi,
suppose we have a xml-file looking like that.
<AAA>
<IGNORE>
</IGNORE>
<READIT>
<BB>
</BB>
<BB>
</BB>
</READIT>
</AAA>
We have an application object defined associated with the structure of <READIT></READIT> and want to read the data in IFS.
But we are not interested in data which is not between <READIT></READIT>.
So, how to say the parser to ignore anything what is not between <READIT></READIT>?
Help appreciated.
Thomas
null
Right now (i.e., in version 1.1), you can't. The parser will try to grab every element in the XML file and do something with it. In version 1.2 (soon to release), you'll be able to pick and choose which XML elements you want to parse.
Similar Messages
-
Get method ignores xml tags?
This is what I have in my little servlet:
response.setContentType("text/xml;charset=UTF-8");
PrintWriter out = response.getWriter();
String xmlRequest = request.getParameter("xml");
if (xmlRequest != null)
out.println("Client request: " + xmlRequest);
}When I tried passing the data to the server (where the servlet resides), the output on the browser shows...
Client request: hihi2
But the output that I was hoping to see is actually <test><hi>hi</hi><hi2>hi2</hi2></test> since I did the request this way: http://localhost:8084/HS/HSServlet?xml=<test><hi>hi</hi><hi2>hi2</hi2></test>
Please advise.
Thanks.You probably want to HTML encode the XML string, like this:
<test><hi>hi</hi><hi2>hi2</hi2></test>If you have embedded the XML directly in an HTML form, then chances are the browser is filtering out the XML tags as unrecognized HTML tags. Either of these examples would pose a problem:
<form action="http://localhost:8084/HS/HSServlet">
<input name="xml" value="<test><hi>hi</hi><hi2>hi2</hi2></test>">
<input type="submit">
</form>or
<a href="http://localhost:8084/HS/HSServlet?xml=<test><hi>hi</hi><hi2>hi2</hi2></test>">Test</a> -
XML tags in an "export : XML" Report Template
Hi All,
I'm using the export XML report template to produce XML from a query. One of the column contains XML tags and the template is translating eg: if the column is "Groups" then I get:
<Groups>& lt ;Group& gt ;Sales & lt ;/Group & gt ; & lt ;Group& gt ;IT& lt ;/Group& gt ;</Groups>(ignoring all the spaces - OTN is translating the & gt 's :)
instead of:
<Groups><Group>Sales<Group><Group>IT</Group></Groups>Is there an easy way to stop this ?
Thanks,
Steve
Edited by: spilgrim on Mar 6, 2009 12:14 PM
Edited by: spilgrim on Mar 6, 2009 12:14 PMHi Steve,
Did you ever solve this? I'm having a similar issue while trying to build a Report Query that I want to build with nested elements.
<?xml version="1.0" encoding="UTF-8" ?>
- <ROWSET>
- <ROW>
<EE_ID>467</EE_ID>
<EE_GRIDS>
<EE_GRID INDEX="1">
<EE_INCENTIVE_CASH_PROGRAM>MIP</EE_INCENTIVE_CASH_PROGRAM>
<EE_BONUS>20</EE_BONUS>
</EE_GRID>
<EE_GRID INDEX="2">
<EE_INCENTIVE_CASH_PROGRAM>VIP</EE_INCENTIVE_CASH_PROGRAM>
<EE_BONUS>30</EE_BONUS>
</EE_GRID>
</EE_GRIDS>
</ROW>
- <ROW>
<EE_ID>468</EE_ID>
<EE_GRIDS>
<EE_GRID INDEX="1">
<EE_INCENTIVE_CASH_PROGRAM>MIP</EE_INCENTIVE_CASH_PROGRAM>
<EE_BONUS>20</EE_BONUS>
</EE_GRID>
<EE_GRID INDEX="2">
<EE_INCENTIVE_CASH_PROGRAM>VIP</EE_INCENTIVE_CASH_PROGRAM>
<EE_BONUS>30</EE_BONUS>
</EE_GRID>
</EE_GRIDS>
</ROW>
</ROWSET>
Thanks
Keith
Edited by: kmatthew on Mar 17, 2009 2:44 PM -
Add xml Tags in Indesign CS4 by Apple/Java script
Hi,
All, I'm new to Indesign Scripting, and I'm hoping someone can help me with the following add xml tags in my xml indesign cs4 files.
I have IDML (ETMV2) xml Indesign CS4 files. But i have lots of powermath equation without xml tags. So i want how i can insert xml tags.
My probleam like this =>
<no open xml tags>[&x^{2}+y_{3}&]<no close xml tags>
I want like this (But i do manualy)
<inlineequation><inlinemediaobject><textobject role="xpressmath">[&x^{2}+y_{3}&</textobject></inlinemediaobject></inlineequation>
Can anyone write/suggest me how i can add xml Tags. By Apple/Java Script
Any insight is appreciated!
snegigHi,
John Hawkinson thank you so much your suggestion.
I am new this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
Thank you John again i am new in this industry please guide.
snegig -
Edit JS Script CS4 (Add XML Tags All pages automatically)
Hi, all Scripter
I have a javascript for add xml tags (ETMV2 Pearson, InDesign CS4). We have select my powermath equation data then run script. Script automatically insert xml tags both side (open/close). But we select one by one then run script its time taking.
var d=app.activeDocument,
root=d.xmlElements[0],
ie = root.xmlElements.add("inlineequation", app.selection[0]),
im = root.xmlElements.add("inlinemediaobject", ie.texts[0]),
to = root.xmlElements.add("textobject", im.texts[0]);
to.xmlAttributes.add("role", "xpressmath");
Example 1: My powermath equation data (InDesign CS4)
[&x^{2}+y *frac*{1}{2x}&]
Select powermath equation data then run javascript below mention. Script insert xml tags.
<inlineequation><inlinemediaobject><textobject>[&x^{2}+y *frac*{1}{2x}&]</inlineequation></inlinemediaobject></textobject>
Its time taking and select one by one
Result:
My main concern is that is this possible script find open [& and close &] all poermath equation data automatically then insert (add) xml tags all pages.
Thank/Regard
snegigHi,
John Hawkinson thank you so much your suggestion.
I am new this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
Thank you John again i am new in this industry please guide.
snegig -
Create custom XML tag, Flex 4.6
hi all
I have a question.
I have the following tag:
<tns:dynamic xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style">
</tns:dynamic>
The dynamic part should be dynamic.
I have tried the following code;
<tns:{actionscript.variable} xmlns:tns="urn:sap-com:document:sap:soap:functions:mc-style">
</tns:{actionscript.variable}>) ;
But i get the 1110 error; Missing XML tag name. So i do something wrong.
Does anybody know how to solve this?
Kind regards,
AntYou're not adding your filefilter as an argument of browseForOpen.
ie: browseForOpen("Apri", filterTesto);
But it might not make any difference:
http://forums.adobe.com/thread/834035
And from the actionscript refence:
"Note: On Android devices, the file dialog title cannot be set. The title parameter is ignored." -
Can't use HTML in XML tags anymore?
I've noticed with 1.1 that HTML that worked in an XML tag in
1.0 no longer displays. Spry seems to be taking what is in the tags
as a literal string. For the most part, I've been able to work
around this, however, I'm running into some issues now where there
are tags that are empty because a certain product just has nothing
to go in that tag. When that happens, it is being displayed on the
page as:
<td></td> and the style I'm calling on all
<td>'s (a bottom border) doesn't show since there is nothing
in the tag at all. I tried just putting a space, but white space
(when there is nothing but whitespace) is ignored and putting
results in the XML not loading correctly. &nbsp;
results in " " showing up in that <td> whereas in
1.0, it would've been a non-breaking space.
I guess what I'm asking is if there is a way to still get
HTML to display correctly or if there is some sort of workaround
for cells that end up being blank?I completed deleted the old way, so I have to recreate this
from scratch...but here is how I used to be able to do it (which,
looking at how I do it now since HTML wasn't parsing, this was so
stupid).
<chair id="1" price_point="High-end">
<image><a
href='/dsn/catalog/viewproductpage.asp?OwnerID=1&PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'><img
src='/images/s/dshe/mini/7/79219.jpg border='0'
/></a></image>
<description><a
href='/dsn/catalog/viewproductpage.asp?OwnerID=1&PageID=%7B7A0FB858%2D2184%2D4033%2DB 474%2D2B22D89BBD96%7D'>Toni</a></description>
<brand>Kwalu</brand>
<composition>Kwalu</composition>
<leg_style>Chippendale</leg_style>
<overall_style>Transitional</overall_style>
</chair>
And now in 1.1, having that, it prints this on screen:
<a
href='/dsn/catalog/viewproductpage.asp?OwnerID=1&PageID=%7B7A0FB858%2D2184%2D4033%2DB474% 2D2B22D89BBD96%7D'><img
src='/images/s/dshe/mini/7/79219.jpg border='0' /></a>
whereas before, it would be that image and it would link to
the page specified in the href.
I'm about to take off from work for the night, but I'll check
back when I get home if you need anything else from me.
Thanks for your help, Kin. :)
Kyle -
Document contains too many nodes error when extracting xml tag name
I Have a large xml file in which the tag contains ~: as the value.
Now I am trying to extract all the tags which have ~: as the value and store that column using the following query and insert into a table.
insert into space_md select distinct xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
where instr(extract(value(x),'/').getstringval(),'~:') > 1;
The xml file was generated using dbms_xmlgen.getxml. Table has 48 columns and around 4000 rows.
My above insert query gave me an error of 31186 too many nodes error.
I am using oracle version 10.2.0.3.
Following are the set of commands I ran....
SQL> insert into gt_xmltype_tab(xmlfile1)
values(XMLType(bfilename('BKUP_RES','QC.xml'),nls_charset_id('AL32UTF8'))); 2
1 row created.
SQL> SQL>
SQL> insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
2 from gt_xmltype_tab gt, TABLE(XMLSequence(extract(gt.xmlfile1, '/ROWSET/ROW/*'))) x
3 where instr(extract(value(x),'/').getstringval(),'~:') > 1;
insert into restore_space_metadata select distinct 'QC', xmltype(extract(value(x), '/').getstringval()).getrootelement() COLUMN_NAME
ERROR at line 1:
ORA-31186: Document contains too many nodes
Is there a better way of extracting the xml tag element name based on the xmltag content?
There is one other table which has 172 columns but only 100 rows so it doesnt create any problem on that table.
But this QC table has less columns but many many rows...
Any suggestionsThere is a requiremnent of taking centain type of data backup and restore it.
It was implemented on flat file approach which was giving errors.
So it was implemented using XML approach.
Read data, store in xml file and read from xml file and load it into table.
Further, found that dbms_xmlstore is not able to handle tag only with whitespace
and tried to use the loading xml file into xmltype table column and extract data.
XMLTYPE column also has same problem of ignoring whitespace when used with extractvalue functions.
So for the workaround I update xmlfile having only one more more whitespace in the tag to have ~: character once.
After restoring data from xml to table I would run update qeury to update ~: to " ".
Now instead of running blind update for all the tables and all the columns from ~: to " " I thouhgt whyy not create a xml file of tag having ~:
along with its tablename.
and thats where I found the problem of too many nodes...
THe insert query you saw is populating table for table_name and column_name with tag having only ~: in it.
I hope this gives you the fair idea of stuff I am doing. -
Want PI to ignore Cdata tags....
Hi folks,
Just need your inputs,
Can PI ignore Cdata tags in Messages?Hi,
Please have a look at the following links and see if it helps you.
CDATA tag in xml
Handling special characters in an IDOC to XML interface using BC
Best Regards -
How to insert blank spaces in XML tag?
Hi Experts,
I have a variable of type char and lenght 10 with value "ABCDE". When I write this value in xml tag <TEXT> using simple transformation it ignores the trailing blank spaces and the result xml string looks as <TEXT>ABCDE</TEXT>.
I want the xml tag with trailing blank spaces i.e. it should be like <TEXT>ABCDE </TEXT>. And suppose if the variable does not contain any value, the xml tag should contain 10 blank spaces like <TEXT> </TEXT>.
I have tried using the solution given in this link
http://help.sap.com/saphelp_nwpi71/helpdata/en/44/f52846257a0485e10000000a155369/frameset.htm
but unfortunately it doesn't work.
Please guide me to achieve this.
Regards,
RaviABAP prog:
DATA: text(10) TYPE c VALUE 'ABCDE',
xml_xstring TYPE string.
CALL TRANSFORMATION z_test SOURCE root = text
RESULT XML xml_xstring.
WRITE xml_xstring.
Transformation:
<?sap.transform simple?>
<tt:transform xmlns:tt="http://www.sap.com/transformation-templates">
<tt:root name="ROOT"/>
<tt:template>
<Text tt:value-ref="ROOT"/>
</tt:template>
</tt:transform>
Result in xml string:
<?xml version="1.0" encoding="utf-16"?>#<Text>ABCDE</Text>
Also tried transformation using:
<tt:template>
<Text>
<tt:value length="10" ref="ROOT"/>
</Text>
</tt:template>
Thanks. -
Unused XML Tags in InDesign CS2.....
Hi all,
Using Javascript i need to generate a report for all unused XML Tags in InDesign CS2.
Please help it is very urgent...
Thanks in advance...
Regards
SubhaHi,
John Hawkinson thank you so much your suggestion.
I am new this type of discusion (on this page). So i think anybody could not replay my answer. So i repost my question.
I want insert tags in my Indesign CS4 files. Is this posible when i select my powermath equaiton then run script. Script add tags automatically before/after my equation. Please ignore IDML word.
Yes i an comfortable with XSLT presently i working with Pearson ETMV2.
I have one more question when i past my snapshot its appear properly but when i agin see my commant then my snapshot disappear (see small blue rectangle).
Thank you John again i am new in this industry please guide.
snegig -
XML tagged content flows in as one paragraph
Hi gang,
I am working on a small XML to InDesign project. I set up the document. It has paragraph and character styles. It has XML tags. It has tags mapped to styles. I built a model example of text and tagged it carefully, applying xml tags to text and not including the hard returns.
When I import the XML and then drag it onto the page, the entire xml content shows up and most of it is correct. Most xml tags arrive as separate paragraphs that are correctly paragraph-styled.
Except for just three xml tags. They all arrive within one paragraph. I need them to be on separate paragraphs. It ignores my xml-tagged model of text. All but these three tags show up correctly with hard returns separating them.
How can I get the remaining three tags (which are 6 child elements deep in the xml structure) to show up as separate paragraphs instead of in one paragraph?
Best to you,
Mike Witherell in MarylandSo, if the basic idea behind [Jongware]'s XSLT is what you need, you can modify it. For example, let's say you have three elements, foo, bar, and rad. foo and bar should be on their own lines.
<?xml version="1.0" encoding="iso-8859-1" ?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="2.0">
<xsl:template match="/ | node() | @*">
<xsl:copy>
<xsl:apply-templates select="@* | node()" />
</xsl:copy>
</xsl:template>
<xsl:template match="foo|bar">
<xsl:copy><xsl:apply-templates /></xsl:copy><xsl:text>
</xsl:text>
</xsl:template>
</xsl:stylesheet>
This applies Jongware's line break template to the foo and bar tags, while copying everything else as is. You can add more tags to the second template by separating them with the bar character. -
XML tag markers moved: Find and Replace causing problem in xml elements
Hi All,
I am doing find and replace using GREP. While using the expression like $1, $2 (Found Items) in the change to field it changes the placement of tag marker. If the found item is a part of two of more xml elements, I am getting a serious problem while replacing it. (ie. The xml tag markers are moved.)
See the screen shot below, then you may get better idea. And help me to overcome this issue.
This is just an example to show you what i'm trying to say, there are so many cases like this.
Original text/ Before doing find replace
After replacing
Green4everHi Peter and John,
but it seems to me that the example is looking for any space that
follows a semi-colon and has two word characters following it, and
repalce that with an em space. I think you could do the same using look
behind and look ahead and not need to replace the found text.
Yes you are right about the look behind and look ahead. I'd like to show some more examples to show what the actual problem is,
Original/Before Replacing,
(Consider there is another case here, instead of em-space some times normal word space will also be there)
Using the Grep:
Find What---------> ^(\d+\.(?:\d+)?)~m
Change To------------->$1\t
After Replace:
Did I make any sense? Eventhough this will not make any changes in the layout, my requirement is to insert the tab out-side the tag marker not indise.
Green4ever -
Urgent help needed for XML Tags using XMLForest()
Folks
I need some urgent help regarding getting use defined tag in your
XML output.
For this I am using XMLElement and XMLForest which seems to work fine
when used at the SQL prompt but when used in a procedure throws and error
SQL> Select SYS_XMLAGG(XMLElement("SDI",
XMLForest(sdi_num)))
From sdi
where sdi_num = 22261;- WORKS FINE
But when used in a procedure,doesnt seem to work
Declare
queryCtx DBMS_XMLQuery.ctxType;
v_xml VARCHAR2(32767);
v_xmlClob CLOB;
BEGIN
v_xml:='Select SYS_XMLAGG(XMLElement("SDI",
XMLFOREST(sdi_num)))
From sdi
where sdi_num = 22261';
queryCtx :=DBMS_XMLQuery.newContext(v_xml);
v_xmlClob :=DBMS_XMLQuery.getXML(queryCtx);
display_xml(v_xmlClob);
End;
CREATE OR REPLACE PROCEDURE display_xml(result IN OUT NOCOPY CLOB)
AS
xmlstr varchar2(32767);
line varchar2(2000);
BEGIN
xmlstr:=dbms_lob.SUBSTR(result,32767);
LOOP
EXIT WHEN xmlstr is null;
line :=substr(xmlstr,1,instr(xmlstr,chr(10))-1);
dbms_output.put_line('.'||line);
xmlstr := substr(xmlstr,instr(xmlstr,chr(10))+1);
END LOOP;
end;
SQL> /
.<?xml version = '1.0'?>
.<ERROR>oracle.xml.sql.OracleXMLSQLException: Character ')' is not allowed in an
XML tag name.</ERROR>
PL/SQL procedure successfully completed.
SQL>HELP is appreciated as to where I am going wrong?Hi,
if you want to transform something to something else, you should declare, what is your source.
I would prefer to use plain XSL-Transformations, because you have a lot more options to transform your source and you can even better determine, how your output should looks like.
Kind regards,
Hendrik -
Error for fetching long text in xml tag for xml publisher report
My requirement is to fetch a large document which is in text format in XML output which can be printed in PDF format by using RTF method to generate PDF.But during XML ouput i got the following error-
The XML page cannot be displayed
Cannot view XML input using XSL style sheet. Please correct the error and then click the Refresh
button, or try again later.
The following tags were not closed: XXBG_EAMWRREP_V1, LIST_G_WO_ACTIVITY_CODE, G_WO_ACTIVITY_CODE, LIST_G_MEDIA_ID1,
G_MEDIA...
XXBG_EAMWRREP_V1 is the rdf and LIST_G_WO_ACTIVITY_CODE, G_WO_ACTIVITY_CODE, LIST_G_MEDIA_ID1, G_MEDIA are the groups name. In the group
G_MEDIA i am fetching long_text from attahcment in application. In Database table the datatype of the text attachment is 'long' and there is a huge text
data loaded in large data editor of that column. If the text data volume is small enough then there is no problem for fetching the xml output.
If we change the output format as HTMl then there is no problem for fetching the output for long text but for xml output format we are unable to fetch the data
in xml tag.
One thing to mention the oracle report is the copy of Maintenance Work Order Detail Report. The seeded report is HTML format in 11i. The requirement is to make it in xml report.
Please help.Hi,
Actually clob datatype is not available in oracle report builder datatype lov. Could you pls tell the other ways of converting that to clob in oracle report...
Maybe you are looking for
-
Text continues moving horizontally rather than starting a new line in editable text field
I am trying to make a feed backbox for visitors on my website. I have made the editable text field and scroll bar and set all of my preferences, but when the typing reaches the border on the right of the text field it just continues to type further h
-
List View Web Part - Default Chrome Setting
In our environment, the "Default" chrome setting does not display the title or the border on our list view pages. We have tried Oslo and Seattle master pages and neither displays this to the end user. We do see the title in Edit mode, but not once th
-
Can more than one delimiter be use at the same time for spreadsheet string to array
I have a text header in my data file that is space delimited and the data in the file is tab delimited? Any suggestion?
-
YouTube not displaying properly in iOS 8.02
IIs anyone else having problems with YouTube app for iPad not displaying properly?ont he YouTube homepage all the what to watch videos are pushed completely to,the right hand side of the screen and will not move towards the middle of the screen Which
-
Help with Oracle 9i/10g on RedHat 4?
If anybody can help would be greatly appreciated... I get the same error with Oracle 9i & 10g when installing on Red Hat Fedora 4, it's java related... Exception in thread "main" java.lang.UnsatisfiedLinkError: /tmp/OraInstall2007-03-16_01-09PM/jre/l