CDATA links in xml document
Hello all,
I am trying to add an html link inside a parapgraph of text that is loaded through an xml document. I have done some research and it appears I need to set my actionscript to read the html. When I add the href in the text it reads literally as the code instead of creating a hyperlink in the paragraph. My problem is I did not set up the original flash document and I anot sure where to add the htmlText=true; and so on.
Here is the link. The problem is in the "press" section. last line in the paragraph of text. You can see the aref code not working.
http://atelierdelalain.com/index_test.html
Thanks in advance for any help!
Sandra
XML data:
<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<images>
<pic>
<image>http://atelierdelalain.com/press/01.jpg</image>
<title><![CDATA[WHAT IS JAMES WEARING?]]></title>
<desc><![CDATA[As you know by now, I love to incorporate the work of fine artisans and crafts people into the interiors I create for both myself and my clients; an individually handcrafted object really can make a space.
This brings me to furniture maker Emmanuel Delalain and his company Atelier Delalain who are doing the most marvelous things in wood and metal. With clean elegant lines, highly considered functionality, and a rich sensual poetry to his work, it didn't surprise us to learn that Delalain honed his craft as a young man in the Southern French coastal workshop of his father and grandfather building sailboats.
To view full article click here.<a href="http://www.strutdenver.com" target="_blank">Strut</a>]]></desc>
<dims><![CDATA[]]></dims>
<note><![CDATA[]]></note>
<thumbnail>http://atelierdelalain.com/press/thumbs/01.jpg</thumbnail>
<width>600</width>
<thumbwidth>47</thumbwidth>
<subpics>
</subpics>
</pic>
</images>
Actionscript Code:
import mx.transitions.*;
import mx.transitions.easing.*;
displayWidth = Stage.width;
function loadXML(loaded) {
if (loaded) {
xmlNode = this.firstChild;
image = [];
title = [];
desc = [];
dims = [];
note = [];
thumbnails = [];
imageW = [];
subimage = [];
subthumb = [];
subW = [];
subArray = new Array();
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
title[i] = xmlNode.childNodes[i].childNodes[1].firstChild.nodeValue;
desc[i] = xmlNode.childNodes[i].childNodes[2].firstChild.nodeValue;
dims[i] = xmlNode.childNodes[i].childNodes[3].firstChild.nodeValue;
note[i] = xmlNode.childNodes[i].childNodes[4].firstChild.nodeValue;
thumbnails[i] = xmlNode.childNodes[i].childNodes[5].firstChild.nodeValue;
imageW[i] = xmlNode.childNodes[i].childNodes[6].firstChild.nodeValue;
if (i == 0) {
thisX = 0;
w = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;
} else {
thisX = Number(w)+Number(2);
thisW = xmlNode.childNodes[i].childNodes[7].firstChild.nodeValue;
w = Number(thisX)+Number(thisW);
//number of subpics
total_subpics = xmlNode.childNodes[i].childNodes[8].childNodes.length;
if (total_subpics != undefined) {
subArray[i] = new Array();
for (x=0; x<total_subpics; x++) {
subArray[i][x] = new Array();
subArray[i][x][0] = xmlNode.childNodes[i].childNodes[8].childNodes[x].childNodes[0].firstChild.nodeValue;
subArray[i][x][1] = xmlNode.childNodes[i].childNodes[8].childNodes[x].childNodes[1].firstChild.nodeValue;
subArray[i][x][2] = xmlNode.childNodes[i].childNodes[8].childNodes[x].childNodes[2].firstChild.nodeValue;
subArray[i][x][3] = xmlNode.childNodes[i].childNodes[8].childNodes[x].childNodes[3].firstChild.nodeValue;
thumbnails_fn(i, thisX);
firstImage();
} else {
content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("flash/press.xml");
listen = new Object();
listen.onKeyDown = function() {
if (Key.getCode() == Key.LEFT) {
prevImage();
} else if (Key.getCode() == Key.RIGHT) {
nextImage();
Key.addListener(listen);
previous_btn.onRelease = function() {
prevImage();
next_btn.onRelease = function() {
nextImage();
p = 0;
this.onEnterFrame = function() {
filesize = picture.getBytesTotal();
loaded = picture.getBytesLoaded();
preloader._visible = true;
if (loaded != filesize) {
preloader.preload_bar._xscale = 100*loaded/filesize;
} else {
preloader._visible = false;
if (picture._alpha<100) {
picture._alpha += 10;
subHolder._alpha += 10;
function nextImage() {
if (p<(total-1)) {
p++;
if (loaded == filesize) {
///////////// sub thumbs ////////////
subHolder.removeMovieClip();
if (subArray[p] != undefined) {
createEmptyMovieClip("subHolder", 10);
subHolder._x = 800;
for (z=0; z<subArray[p].length; z++) {
subthumbs_fn(p, z);
createEmptyMovieClip("Line", 1);
lineLen = z*60+z*5;
Line.lineStyle(1, 0x492F92, 100);
Line.moveTo(795, 0);
Line.lineTo(795, lineLen);
createEmptyMovieClip("Line2", 2);
Line2.lineStyle(1, 0x492F92, 100);
Line2.moveTo(895, 0);
Line2.lineTo(895, lineLen);
} else {
Line._alpha = 0;
Line2._alpha = 0;
subHolder._alpha = 0;
///////////// end sub thumbs ////////////
picture._alpha = 0;
picture.loadMovie(image[p], 1);
//displayWidth = Stage.width;
imageWidth = imageW[p];
res = displayWidth-imageWidth;
place = res/2;
picture._x = place;
title_txt.htmlText = true;
title_txt.htmlText = title[p];
desc_txt.htmlText = desc[p]+" "+dims[p]+". "+note[p];
picture_num();
function prevImage() {
if (p>0) {
p--;
///////////// sub thumbs ////////////
subHolder.removeMovieClip();
if (subArray[p] != undefined) {
createEmptyMovieClip("subHolder", 10);
subHolder._x = 800;
for (z=0; z<subArray[p].length; z++) {
subthumbs_fn(p, z);
createEmptyMovieClip("Line", 1);
lineLen = z*60+z*5;
Line.lineStyle(1, 0x492F92, 100);
Line.moveTo(795, 0);
Line.lineTo(795, lineLen);
createEmptyMovieClip("Line2", 2);
Line2.lineStyle(1, 0x492F92, 100);
Line2.moveTo(895, 0);
Line2.lineTo(895, lineLen);
} else {
Line._alpha = 0;
Line2._alpha = 0;
subHolder._alpha = 0;
///////////// end sub thumbs ////////////
picture._alpha = 0;
picture.loadMovie(image[p], 1);
//displayWidth = Stage.width;
imageWidth = imageW[p];
res = displayWidth-imageWidth;
place = res/2;
trace("dW:"+displayWidth+"iW:"+imageWidth+"x:"+place);
picture._x = place;
title_txt.htmlText = true;
title_txt.htmlText = title[p];
desc_txt.htmlText = desc[p]+" "+dims[p]+". "+note[p];
picture_num();
function firstImage() {
if (loaded == filesize) {
///////////// sub thumbs ////////////
subHolder.removeMovieClip();
if (subArray[p] != undefined) {
createEmptyMovieClip("subHolder", 10);
subHolder._x = 800;
for (z=0; z<subArray[p].length; z++) {
subthumbs_fn(p, z);
createEmptyMovieClip("Line", 1);
lineLen = z*60+z*5;
Line.lineStyle(1, 0x492F92, 100);
Line.moveTo(795, 0);
Line.lineTo(795, lineLen);
createEmptyMovieClip("Line2", 2);
Line2.lineStyle(1, 0x492F92, 100);
Line2.moveTo(895, 0);
Line2.lineTo(895, lineLen);
} else {
Line._alpha = 0;
Line2._alpha = 0;
subHolder._alpha = 0;
///////////// end sub thumbs ////////////
picture._alpha = 0;
picture.loadMovie(image[0], 1);
//displayWidth = Stage.width;
imageWidth = imageW[0];
res = displayWidth-imageWidth;
place = res/2;
picture._x = place;
title_txt.htmlText = true;
title_txt.htmlText = title[p];
desc_txt.htmlText = desc[p]+" "+dims[p]+". "+note[p];
picture_num();
function picture_num() {
current_pos = p+1;
pos_txt.text = current_pos+" / "+total;
function thumbNailScroller() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
scroll_speed = 10;
tscroller.onEnterFrame = function() {
if ((_root._ymouse>=thumbnail_mc._y) && (_root._ymouse<=thumbnail_mc._y+thumbnail_mc._height)) {
if ((_root._xmouse>=(hit_right._x-60)) && (thumbnail_mc.hitTest(hit_right))) {
thumbnail_mc._x -= scroll_speed;
} else if ((_root._xmouse<=(hit_left._x+60)) && (thumbnail_mc.hitTest(hit_left))) {
thumbnail_mc._x += scroll_speed;
} else {
delete tscroller.onEnterFrame;
function thumbnails_fn(k, xpos) {
thumbnail_mc.createEmptyMovieClip("t"+k, thumbnail_mc.getNextHighestDepth());
tlistener = new Object();
tlistener.onLoadInit = function(target_mc) {
target_mc._x = xpos;
target_mc.pictureValue = k;
target_mc.onRelease = function() {
p = this.pictureValue-1;
nextImage();
target_mc.onRollOver = function() {
this._alpha = 80;
thumbNailScroller();
target_mc.onRollOut = function() {
this._alpha = 100;
image_mcl = new MovieClipLoader();
image_mcl.addListener(tlistener);
image_mcl.loadClip(thumbnails[k], "thumbnail_mc.t"+k);
function scrollLeft() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
if (thumbnail_mc.hitTest(hit_right)) {
thisX = thumbnail_mc._x;
dist = hit_right._x-thumbnail_mc._x;
r = thumbnail_mc._width-dist;
if (r>=200) {
newX = thumbnail_mc._x-200;
} else {
newX = thumbnail_mc._x-r;
new Tween(thumbnail_mc, "_x", Regular.easeOut, thisX, newX, .5, true);
function scrollRight() {
// thumbnail code!
this.createEmptyMovieClip("tscroller", 1000);
if (thumbnail_mc.hitTest(hit_left)) {
thisX = thumbnail_mc._x;
dist = hit_left._x-thumbnail_mc._x;
if (dist>=200) {
newX = thumbnail_mc._x+200;
} else {
newX = thumbnail_mc._x+dist;
new Tween(thumbnail_mc, "_x", Regular.easeOut, thisX, newX, .5, true);
buttonRight.onRelease = function() {
scrollLeft();
buttonLeft.onRelease = function() {
scrollRight();
function subthumbs_fn(p, z) {
subHolder.createEmptyMovieClip("sub"+z, subHolder.getNextHighestDepth());
sublistener = new Object();
sublistener.onLoadInit = function(targ_mc) {
//targ_mc._x = 800;
targ_mc._y = 60*z+5*z;
thumbWidth = subArray[p][z][3];
thumbRes = 90-thumbWidth;
thumbPlace = thumbRes/2;
targ_mc._x = thumbPlace;
trace(targ_mc._x);
targ_mc.onRelease = function() {
//p = this.pictureValue-1;
//nextImage();
picture._alpha = 0;
picture.loadMovie(subArray[p][z][0], 1);
//displayWidth = Stage.width;
imageWidth = subArray[p][z][2];
res = displayWidth-imageWidth;
place = res/2;
picture._x = place;
this._alpha = 30;
//picture_num();
targ_mc.onRollOver = function() {
targ_mc._alpha = 80;
trace(targ_mc);
targ_mc.onRollOut = function() {
this._alpha = 100;
sub_mcl = new MovieClipLoader();
sub_mcl.addListener(sublistener);
sub_mcl.loadClip(subArray[p][z][1], "subHolder.sub"+z);
Thank you for your replies
I tried adding the code mentioned, but I still can't get it to work. I added:
title_txt.htmlText = true;
title_txt.htmlText = title[p];
desc_txt.htmlText = true;
desc_txt.htmlText = desc[p]+" "+dims[p]+". "+note[p];
Am I adding in the wrong place? The text box that has the html in it is the "desc_txt" box. Any clues as to where the code would go in relation to the above code listed?
Again... thank you for all of your help. Really appreciated!
Sandra
Similar Messages
-
Hi,
Attached is code from my xml file. This feeds a flash movie
template. I want visitors to be able to click on an image which
then takes them to another page to see a slideshow.
Any help will be greatly appreciated!
Thanks.Hi,
I am not a XSLT expert but Tobias wrote some nice blogs about it. Read them here:
/people/tobias.trapp/blog
You might want to start with this one:
/people/tobias.trapp/blog/2005/05/04/xml-processing-in-abap-part-1
cheers
Thomas -
Creating an xml document from filenames of selected files
Hey guys, I am totally new to automator and applescript so please be kind!
I have an xml/flash image portfolio website which has image galleries. Each gallery has an xml document which specifies a thumbnail and full size photo to be displayed in the gallery. If I want to make a new gallery I have to make a new xml document and enter all the filenames of the images I want to display in the gallery. ( I guess you can see where this is going).
This is fine if I have 10 images in the gallery but if I want to make a gallery with 350 images in then it could get pretty tedious.
What I would love to be able to do is select a group of images and then have a script or automator action that can copy the files names and create a new gallery xml document containing the relevant code with all the files names. Ideally then saving the gallery with a sequential filename.
Tying this into the new contextual services menu in snow leopard would really make the task incredibly easy.
Is this possible? I'm not scared of learning how to do this therefore some pointers in the right direction would be great.
Thanks,
ChrisThanks Camalot,
I was just thinking of selecting images from the finder but if this could be integrated into Aperture's export dialog that would be even better.
this is the xml:
<?xml version="1.0" encoding="utf-8"?>
<gallery thumbwidth="220" thumbheight="138" columns="3" gap="4">
<item>
<ID>1</ID>
<title><![CDATA[Title 1]]></title>
<desc><![CDATA[This is description 1. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
<thumb>images/thumbs/7.jpg</thumb>
<image>images/big/7.jpg</image>
</item>
<item>
<ID>2</ID>
<thumb>images/thumbs/8.jpg</thumb>
<image>images/big/8.jpg</image>
</item>
<item>
<ID>3</ID>
<title><![CDATA[Title 3]]></title>
<desc><![CDATA[This is description 3. <font color="#0099CC">This is a colourful text. </font> This is a <a href="http://www.flashden.net/user/iceonflames">link</a>. <i>This is italic text.</i> <b>This is bold text.</b> <b><i>This is bold italic text.</i></b> This text is styled by a CSS document.<br/><br/>]]></desc>
<thumb>images/thumbs/9.jpg</thumb>
<image>images/big/9.jpg</image>
</item>
</gallery> -
I want to add a link in the XML document.
<![CDATA[Akita Prefecture Skating Arena – Northern
Japan. This skating rink received a re-roof over a metal roof.
167,380 sq. ft. (15,550 m2) of light gray, 45-mil (1.14 mm) Stevens
EP™ was installed by <LINK VALUE="
http://www.sankometal.co.jp">Sanko
Metal Industries of Japan.</LINK>]]>
it's not working... any ideas?
Thanks,
Ashley"suddadog" <[email protected]> wrote in
message
news:fjmvsm$3bh$[email protected]..
> doesn't depend on the color, I know the color codes! You
don't know what
> you
> are talking about. Stop being a smarty pants and answer
the question. It
> obviously doesn't work if I'm here asking for help.
> I have 10yrs experience with html so don't tell me to go
learn it.
>
> The code I have is
> <![CDATA[Akita Prefecture Skating Arena ? Northern
Japan. This skating
> rink
> received a re-roof over a metal roof. 167,380 sq. ft.
(15,550 m2) of
> light
> gray, 45-mil (1.14 mm) Stevens EP? was installed by
<a
> href="
http://www.sankometal.co.jp"><font
color="#0000FF">Sanko Metal
> Industries
> of Japan.</a></font>]]>
>
> Now can you tell me how come the font doesn't work?
It doesn't work because you switched the closing tag order.
change
</a></font>
into
</font></a>
But depending on where the content will end up eventually you
could also use
CSS to style all links without changing the content.
a:link, a:visited, a:hover, a:active {
color: #0000FF; -
Dynamic Link Buttons & xml file
Hi All
I'm calling an external XML File with a structure of ;
<papers>
<paper id="1">
<name>Net Paper One</name>
<description>
~~~~~~~~~~
</description>
</paper>
</papers>
which i'm calling using
<mx:HTTPService id="myNetPapers"
url="xml/newearthpapers.xml" result="netPapersResultHandler(event)"
resultFormat="e4x"/>
and
private function
netPapersResultHandler(event:ResultEvent):void {
xmlNetPapers = event.result.paper as XMLList;
Initially i wanted to use a combobox for the name and display
the description in a textbox.
How can i dynamically disply a Link Button for each name of
the xml document and still display the description as normal. The
link buttons i want to display horizontally across the top of the
page.
Any suggesttions
WhitetimerHi Leotemp
I managed to sort it out with this ;
<mx:Script>
<![CDATA[
import mx.controls.LinkButton;
import mx.controls.Button;
import mx.controls.Alert;
import mx.rpc.events.ResultEvent;
private var xmlNetPapers:XMLList = new XMLList();
private function
netPapersResultHandler(event:ResultEvent):void
xmlNetPapers = event.result.paper as XMLList;
/* resultCombo.dataProvider = xmlNetPapers.name; */
createButtons();
private function createButtons():void
for each(var name:String in xmlNetPapers.name)
var myButton:Button = new LinkButton();
myButton.label = name;
myButton.addEventListener("buttonDown", buttonClick);
resultBox.addChild(myButton);
/* private function comboChanged(eventObj:Event):void
textOutput.text = xmlNetPapers.(name ==
eventObj.target.selectedItem).description;
private function buttonClick(eventObj:Event):void
textOutput.text = xmlNetPapers.(name ==
eventObj.target.label).description;
]]>
</mx:Script>
Many thanks
Whitetimer -
Displaying XML Document in new browser window
Hi,
I have a hyperlink on my page. When I click on it, it will open a new IE window and display xml document.
The new window is displaying some of the xml and at the end displaying the following:
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.
End element was missing the character '>'. Error processing resource 'http://localhost:28080/benchmark/faces/displayXMLDocu...
However, I cut and paste the xml String where I write it to the HTTPServletResponse to XMLSPY and it displays correctly.
Please let me know.
RgrdsHere are the steps:
1. I created page1 that has a hyperlink.
2. Hyperlink property are set to display page2 in a new window. (popup).
3. page2.prerender() method, I set the response to the following:
public void prerender() {
javax.faces.context.ExternalContext ec = this.getExternalContext();
HttpServletResponse response = (HttpServletResponse)ec.getResponse();
response.setHeader("Cache-Control","no-cache");
response.setHeader("Cache-Control","no-store");
response.setHeader("Cache-Control","must-revalidate");
response.setHeader("Cache-Control","max-age=0");
response.setHeader("Pragma","no-cache");
response.setHeader("Expires","0");
response.setContentType("text/xml");
response.setBufferSize(5000);
String xmlString = getRequestBean1().getBookingPnrDetailsXML();
try{
xmlString="<?xml version=\"1.0\" encoding=\"UTF-8\"?><root><test1>this is a test</test1><victor>Hello Victor</victor></root>";
PrintWriter out = new PrintWriter(response.getOutputStream());
log(xmlString);
out.print(xmlString);
}catch(IOException io){
System.out.println("" + io.getMessage());
io.printStackTrace();
4.page2.jsp code is the following:
<?xml version="1.0" encoding="UTF-8"?>
<jsp:root version="1.2" xmlns:f="http://java.sun.com/jsf/core" xmlns:h="http://java.sun.com/jsf/html" xmlns:jsp="http://java.sun.com/JSP/Page" xmlns:ui="http://www.sun.com/web/ui">
<jsp:directive.page contentType="text/xml;charset=UTF-8" pageEncoding="UTF-8"/>
<f:view/>
<ui:page binding="#{displayXMLDocument.page1}" id="page1"/>
<ui:html binding="#{displayXMLDocument.html1}" id="html1"/>
<ui:head binding="#{displayXMLDocument.head1}" id="head1"/>
<ui:link binding="#{displayXMLDocument.link1}" id="link1"/>
<ui:body binding="#{displayXMLDocument.body1}" id="body1"/>
<ui:form binding="#{displayXMLDocument.form1}" id="form1"/>
</jsp:root>
please let me know.
Rgrds. -
Error: No valid XML document received*_
Hi All,
We are connecting our CCMS system to NetWeaver J2EE engine on which E-Sourcing is running.
For this we registered java component and hosts in cen.
But we are getting error as : No valid XML document received
Please can anyone tell me how to overcome this error.
Thank you .
Regards
MaheshHi,
Please re-read the answer from Marc carefully. He was in the exact same situation as yours:
- Monitored system: NW CE 7.1
- CEN: NW 7.01 (same as NW 7.0 EhP1)
The link you posted is for CEN with NW 7.3 and monitored systems from NW 7.02 (and up). Read the paragraph below the Caution sign:
If you want to centrally monitor any system with a central monitoring system with release SAP NetWeaver 7.0, this procedure is not applicable. In this case, follow the procedure described in the newest Monitoring Setup Guide for SAP NetWeaver 7.0 instead. You can obtain the Monitoring Setup Guide at the Internet address service.sap.com/operationsnw70 in the Monitoring area.
You should look for (and follow) the right Monitoring Setup Guide as mentioned.
Regards,
Dao
Edited by: Dao Ha on Sep 19, 2011 10:38 AM -
Creating an XML document from a DTD in Java
Hi All,
I need help on the following requirement very badly. Pls help me.
I have a requirement to implement with java and XML. I am quit new to XML.Can any of you pls help me.
I have a DTD file. I need to generate XML document from it using java code. I have to use DTD as a template to generate my XML document.
After going through WEB sites, I understtod that, we have to user Java API JAXB for my requirement. But I could not find JAXB.jar anywhere.
I need to know the following inforamtion ....
1. Is my understanding of using JAXB for my requirement is correct?
2. Where can I get JAXB.jar?
3. What are the steps to create XML document from a DTD in Java?
If can give me a sample code for this would help me a lot.
Pls pls reply me. Your help is greatly appreciated.
Thanks in Advance.
Regards,
Gayathri.hi Gayathri,
iam currently working in the same field.
firs download jaxb from this link:
http://java.sun.com/xml/downloads/jaxb.html
first u need to marshall it.
cheers
shashi -
JDBC receiver adapter: No 'action' attribute found in XML document
Hi this is my target structure getting generated at the Receiver JDBC adapter
I have checked the XML doc, still unable to figure out why in the RWB its showing the following error:
"Message processing failed. Cause: com.sap.aii.af.ra.ms.api.RecoverableException: Error processing request in sax parser: No 'action' attribute found in XML document (attribute "action" missing or wrong XML structure)"
<?xml version="1.0" encoding="UTF-8"?>
<ns0:MT_IF001 xmlns:ns0="http://vodafone.com/xi/IF001">
<Statement>
<OPCO_VPC_PO action="UPDATE">
<access>
<SO>0060000090</SO>
<SO_ITEM>000010</SO_ITEM>
</access>
<key>
<OPCO_PO>0002002291</OPCO_PO>
<OPCO_PO_ITEM>00010</OPCO_PO_ITEM>
</key>
</OPCO_VPC_PO>
</Statement>
</ns0:MT_IF001>
Kindly Help !!
Thanks !!Hi,
Clearly stating that no action attribute .So, please take a look at the structure please do like this at your Data Type specification
<i><b><b><root>
<StatementName1>
<dbTableName action=UPDATE | UPDATE_INSERT>
<table>realDbTableName</table>
<access>
<col1>val1</col1>
<col2>val2new</col2>
</access>
<key1>
<col2>val2old</col2>
<col4>val4</col4>
</key1>
<key2>
<col2>val2old2</col2>
</key2>
</dbTableName>
</StatementName1>
</root></b></b></i>
refer the following link
http://help.sap.com/saphelp_nw04/helpdata/en/2e/96fd3f2d14e869e10000000a155106/content.htm
**Assign points if you found helpful
Regards.,
V.Rangarajan -
SAP B1 Studio 9.7 - Error : There is an error in XML document (0, 0)
Hi Friends,
I am using SAP B1 Studio PL-9.7 for form designing.
But now a days i could not open this B1 Studio because of this error :
"System.InvalidOperationException: There is an error in XML document (0, 0). ---> System.Xml.XmlException: Root element is missing."
When open this SAP B1 Studio, it shows one dialog box with the above error. I attached the dialog box image with this. Please help me..
Advance Thanks,
Indra.Hello Christian,
i know this reply is really late ;) I am actually the author of the blog post mentioned by @AnnaWY, the post she mentioned is in regards of a situation 'where everything' is how it should be. Basically, (i think) sometime administrator, or the
person who implements ITSM webservices makes an error, hence this script will not run. You will end up with that issue mentioned, in order to fix it, either you should contact the person who is responsible for that service, OR rewrite the wsdl for it yourself.
It might be a bit problematic, but, it is for sure doable, as in my latest blog post about this issue.
I am writing it here, because i also saw this page, while googling for explanation, i guess there are more people who are looking for this so here is the link to the explanation:
http://wp.me/pAXaY-ht
I hope that helps !
Regards,
Greg -
Good evening!
I am trying to create a SOAP message using DocumentBuilderFactory, but I get an exception if I try to declare mitiple prologs. Is there anyway to declare mutiple prologs?
An XML docuemnt is actually being sent to the WS, so the SOAP message has a prolog and then the XML document that is being passed has one also.
Thanks,
Dougthis,
That shouldn't be difficult to do at all. Start with a text box on page one (make sure it's defined in the Wrap inspector as Floating, and not Inline). Click on the little blue "ear" on the right side of the text box to create a linking text box. Drag that second text box to page three. Position the two text boxes where you want them on their pages, then resize them to suit your needs. Now the overflow text from page one will wrap to page three. Do the same thing for pages two and four.
Does this answer your question?
-Dennis -
I have an application that loads information from an XML file
and displays in a dynamic text box. That works great. Now, I want
to add HTML tags to the information in the XML file so the dynamic
text box will format it. If I add straight html:
<Answer1>of earth, <b>air</b>, fire, and
water.</Answer1>
I get a null displayed in the text box. If I encode
<Answer1>of earth,
>b<air>/<, fire, and
water.</Answer1>
Then it displays
of earth, <b>air</b>, fire, and water.
Any help on how to embedded html code into an XML document so
a dynamic text box uses the html code?
Thanks.Just use CDATA tags around your HTML values, eg:
<Answer1><![CDATA[of earth, <b>air</b>,
fire, and water.]]></Answer1>
HTH. -
Hi
I am new to this particular forum. I had some query regarding embedding XSL .
Can we embedd the XSL stylesheet in the XML document itself.
I searched this forum and got some similar queries but the output isn't working. Can anyone put a working example.
I have got the following XSL stylesheet:
<?xml version="1.0" encoding="ISO-8859-1"?>
<xsl:stylesheet version="1.0"
xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<body>
<table border="1" width="100%" cellpadding="1">
<tr bgcolor="#FFFF99">
<th style="font-family:arial unicode ms;font-size:100%" align="center">Serial number </th>
<th style="font-family:arial unicode ms;font-size:100%" align="center">Site number </th>
</tr>
<xsl:for-each select="Master/RECORD">
<xsl:if test="SR_NO > 0">
<tr>
<td style="font-family:arial unicode ms;font-size:80%" align="right"><xsl:value-of select="SR_NO"/></td>
<td style="font-family:arial unicode ms;font-size:80%" align="right"><xsl:value-of select="ACR_SNO"/></td>
</tr>
</xsl:if>
</xsl:for-each>
</table>
</body>
</xsl:template>
</xsl:stylesheet>
The XML document is as below:
<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/xsl" href="archivingmaster.xsl"?>
<Master>
<RECORD>
<SR_NO>1</SR_NO>
<ACRSNO>1</ACR_SNO>
</RECORD>
<RECORD>
<SR_NO>2</SR_NO>
<ACRSNO>2</ACR_SNO>
</RECORD>
</Master>
Thanks in advance
Ameya.I have already gone through that link and searched for this on the net. But it doesn't seem to work on my Mozilla Firefox browser.
Can anybody put a working example if possible.
Thanks
Ameya. -
Running Report Count all instances of software registered in add remove programs. Run fine in the "old" native SCCM
On Reporting services the report also displays correctly but when drilling down to the linked report "Computers with specific software registered in Add Remove Programs" get the error below
Seems to be for any item in this report - has anyone else seen this ?
There is an error in XML document (1, 478919).
'', hexadecimal value 0x02, is an invalid character. Line 1, position 478919.
Ian Burnell, London (UK)Hello Grath,
I run the following command in sql & find some updates:-
Select distinct
CHARINDEX(cast(0x28 as varchar(1)),DisplayName0),
DisplayName0
from
dbo.v_Add_Remove_Programs
Where
CHARINDEX(cast(0x28 as varchar(1)),DisplayName0) > 0
Screenshot:-
Mentioned above updates makes problem hows to resolve this.
Please suggest the solution on this.
Thanks Rahul$ -
UTL_DBWS, XML Document as a parameter
I'm struggling with using a fully formed xml document as a parameter to a web service.
Using this code I'm able to connect to the web service and sans the arg1 argument everything works.
When I as in the code below use xmltype.toStringValue() or xmltype.toClobValue() charachters like < and > is replaced with the html encoded version (< and >) which does'nt work very well with the recieving web service.
All three parameters is defined as string on the recieving web service.
I've been searching this forum and using google, but can't find any examples doing something like this.
Any help or pointers appreciated.
procedure forwardToQueue is
svc_ sys.utl_dbws.service;
call_ sys.utl_dbws.call;
svc_qname sys.utl_dbws.qname;
response sys.xmltype;
request sys.xmltype;
utMelding sys.xmltype;
t1 sys.xmltype;
t2 sys.xmltype;
doc xmldom.DomDocument;
fListe xmldom.DOMNodeList;
tmpL xmldom.DOMNodeList;
fElement xmldom.domNode;
tmp xmldom.domNode;
meldingId strliten;
arg0_node xmldom.domnode;
arg0_elmt xmldom.domelement;
arg0_text xmldom.domtext;
arg1_node xmldom.domnode;
arg1_elmt xmldom.domelement;
arg1_text xmldom.domtext;
arg2_node xmldom.domnode;
arg2_elmt xmldom.domelement;
arg2_text xmldom.domtext;
child_doc xmldom.domdocument;
main_node xmldom.domnode;
root_node xmldom.domnode;
root_elmt xmldom.domelement;
x sys.xmltype;
c varchar2(32000);
bs_chr strmax;
l_service sys.UTL_DBWS.service;
l_call sys.UTL_DBWS.call;
l_result ANYDATA;
l_wsdl_url strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean?wsdl';
l_namespace strmax := 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean';
l_service_qname sys.utl_dbws.qname;
begin
procName := 'hentQueue';
pl('*************** '||procName||' ***************');
svc_qname := sys.utl_dbws.to_qname(null, 'SIMSFacadeBeanService');
svc_ := sys.utl_dbws.create_service(svc_qname);
call_ := sys.utl_dbws.create_call(svc_);
sys.utl_dbws.set_target_endpoint_address(call_, 'http://salah-test.sismo.local:8080/SIMSEJB/SIMSFacadeBean');
sys.utl_dbws.set_property(call_, 'SOAPACTION_USE', 'TRUE');
sys.utl_dbws.set_property(call_, 'SOAPACTION_URI', 'sendMessage');
sys.utl_dbws.set_property(call_, 'OPERATION_STYLE', 'document');
x := genererSvar;
doc := xmldom.newDOMDocument;
main_node := xmldom.makeNode(doc);
root_elmt := xmldom.createelement(doc, 'q0:sendMessage');
xmldom.setattribute(root_elmt, 'xmlns:q0', 'si.sims.intern.service');
root_node := xmldom.appendChild(main_node, xmldom.makeNode(root_elmt));
-- Adding arg 0 as a string
arg0_elmt := xmldom.createelement(doc, 'arg0');
arg0_node := xmldom.appendchild(root_node, xmldom.makenode(arg0_elmt));
arg0_text := xmldom.createtextnode(doc, '2');
arg0_node := xmldom.appendchild(arg0_node, xmldom.makenode(arg0_text));
-- Adding arg 1 as a string
arg1_elmt := xmldom.createelement(doc, 'arg1');
arg1_node := xmldom.appendchild(root_node, xmldom.makenode(arg1_elmt));
arg1_text := xmldom.createtextnode(doc, x.getClobVal());
arg1_node := xmldom.appendchild(arg1_node, xmldom.makenode(arg1_text));
-- Adding arg 2 as a string
arg2_elmt := xmldom.createelement(doc, 'arg2');
arg2_node := xmldom.appendchild(root_node, xmldom.makenode(arg2_elmt));
arg2_text := xmldom.createtextnode(doc, 'false');
arg2_node := xmldom.appendchild(arg2_node, xmldom.makenode(arg2_text));
request := xmldom.getxmltype(doc);
pl('Request:');
pl(request.getStringVal());
response := sys.utl_dbws.invoke(call_, request);
pl('Showing respons');
pl(response.getStringVal());
doc := DBMS_XMLDOM.newDomDocument(response);
sys.utl_dbws.release_call(call_);
sys.utl_dbws.release_service(svc_);
end forwardToQueue;Is the Document well defined via schema? You might be able to use the autotype
ant task to generate a serializer.
Otherwise, serialize the document to a string, then wrap it in <[CDATA[...]]>
on the return. The calling app will need to understand that the string is xml,
and then desrailize it manually.
Mike
"Surya" <[email protected]> wrote:
>
I have web service which has to retuen an XML document (org.w3c.dom.Document)
as
a paramter. Since this is not a supported data type for in-out paramaters,
I will
have to serialize and write my own converter. What is the best solution?
Is there
any class/library that can convert the document into String which I can
return
as a parameter and again get create a XML document in the client side.
Thanks -Surya
Maybe you are looking for
-
How do I remove a credit card from my account that's not mine
I have an apple account with I tunes .This is my account not jack Boisvert account and I need his MasterCard number taken off my account ending in 9444. This was already suppose to be done last week but it is still there and I'm really upset over thi
-
CC 14 update means I have *two* Photoshops now?...
Now that the CC 14 update came through, I have two Photoshop application folders. Is it necessary to keep the previous CC version if I'm just going to use CC 14 from here on out? It'd be nice to get that HD space back. Thanks.
-
Hi Experts, Scenario : IDOC to JMS when i trigger the idoc the message successfully sent to Moni but, i need to get the symbol of still awaiting acknowledgement instead of that am getting Acknowledgement not possible. Please suggest me how can i do
-
Hi there, I am using a MacBook Pro with OSX 10.5.2. It has suddenly started to have problems with the fonts in fontbook and also doing some very strange font substitutions. Instead of showing text normally it is replacing it with random characters. Y
-
How to read safecontrol tags in C#
I need to read a custom tag section and get that into a collection. Please help me on this. below is my code. private static Dictionary<string, KeyValuePair<string, string>> SafecontrolDifferences(Configuration primaryConfiguration, string webConfigP