Create xml from xml schema in java
If can i create a xml document framework from xml schema in java, then i can fill the value in java?
thanks
An XML document may be created from an XML Schema with JAXB.
Similar Messages
-
Binding xml from web service to java objects
I would appreciate if someone can tell me where can i get information regarding
binding of xml from web service to java objects in weblogic 6.1 .
Thanks,
agHi Ag,
To my knowledge, the only information on this topic is whatever you find in the
documentation. What exactly do you want to know?
Can you post a set of specific questions?
Regards,
Mike Wooten
"ag" <[email protected]> wrote:
>
I would appreciate if someone can tell me where can i get information
regarding
binding of xml from web service to java objects in weblogic 6.1 .
Thanks,
ag -
Hide name space of generated xml from xml bean
Hi,
how can i hide the namespace of the generated xml from xml bean, cause im having problems with jaxb parses.The targetNamespace is for webservice and not for the user defined classes.
Sorry for the confusion
Ajay
"Ajay" <[email protected]> wrote in message
news:[email protected]..
There is a targetNamespace attribute in the autotyp ant task. But there
was a bug in 8.1. Contact the support for a patch.
The following mail explains that
This looks like a bug. There is an undocument, not officially
supported workaround: add the following java doc
to yours source code -
* @wlws:webservice targetNamespace="http://foo.bar"
public class MyService {
Details here:
http://www.manojc.com/tutorial/sample3/source2wsdd.html
Regards,
-manoj
http://manojc.com
"Mark Fine" <[email protected]> wrote in message
news:[email protected]..
The attribute targetNamespace (of the autotype task) doesn't seem to putany
information into the types file and later my deployment descriptor (viathe
source2wsdd task) contains an invalid targetNamespace attribute with a
http://tempuri.org:
eg.
<web-services>
<web-service name="IndexService"
targetNamespace="http://tempuri.org/"
uri="/IndexWebService">
I don't think this causes any problems but there should be a way tospecify
the namespace.
Has anyone else seen this is WLS8.1?
"Siva" <[email protected]> wrote in message
news:[email protected]..
By default the autotype or the servicegen ant task seem to be creating anamespace
from the java package name (like java:com.ventaso.external.common) for
xml
mapping
of user defined java classes. Is there a way to change this to name
space
I want
? Specifying the targetnamespace doesn't seem to help.
Thanks,
Siva -
Unable to create xml from xml schema
JDeveloper 10.1.3 EA1
I am unable to create a new xml file from an xml schema when the starting root element is a complex type (but it works with a simple type). It does not matter if the xml schema is registered within JDeveloper.
Is this a bug or intended behaviour?
Error message:
''XML Document from XML Schema creation could not be competed succesfully. Make sure the source schema is valid and that you have write permissions to the output directory."
NB The xml schema is valid and I have write permissions on the specified directory.When I do not register this (or other) schema with JDeveloper, I can create an xml document from xml schema. However, when I register this schema and then try to generate an xml document (either from the registered xsd either from a filesystem xsd) with person as starting node it fails with the mentioned error. However, when I use city as starting node it is generated successfully.
<?xml version="1.0" encoding="windows-1252" ?>
<xsd:schema xmlns:xsd="http://www.w3.org/2001/XMLSchema"
xmlns="http://www.amis.nl/demo/hrm"
targetNamespace="http://www.amis.nl/demo/hrm"
elementFormDefault="qualified">
<xsd:element name="person">
<xsd:annotation>
<xsd:documentation>
A sample complex element
</xsd:documentation>
</xsd:annotation>
<xsd:complexType>
<xsd:sequence>
<xsd:element name="name" type="xsd:string"/>
<xsd:element name="length" type="xsd:int"/>
<xsd:element name="weight" type="xsd:int" />
</xsd:sequence>
</xsd:complexType>
</xsd:element>
<xsd:element name="city" type="xsd:string">
<xsd:annotation>
<xsd:documentation>
A sample simple element.
</xsd:documentation>
</xsd:annotation>
</xsd:element>
</xsd:schema> -
I was able to find information on how to validate an xml file based on an existing schema, but how about generating an xml file using a schema. Are there java API's for that?
I looked at a couple of the java.xml classes and couldn't find anything. I'd like to be able to go through each schema element, get the attributes, and actually construct an XML file. Can someone please point me in the right direction?
Thanks.I was looking for a programmatic way to do this, so given the choices it seems like JAXB is the best, as XMLSPY & InfoPath are actual applications.
* XMLSPY from Altova has a menu item to generate aFrom their website it seems like it is built to work with Eclipse, but I'm not looking for an IDE, but a java API.
>
* I've used JAXB from the web services developer pack
to compile a schema, fill up the elements using the
get and set methods, and then marshall out to an XML
instance document. I'll look into this--is this the main java API that's used for generating XML documents from a schema?
>
* Or, crossing to the dark side for a moment,
Microsoft's InfoPath 2003 sucks in an XML Schema
document and presents a GUI through which you can
create an instance XML document. I actually found
this a very handy tool for quickly and accurately
building instance documents.Yeah, I think just like XMLSPY I don't know if there are methods I can call from within java to do this, I think I'll probably go with JAXB.
See what you think.Thanks for the advice. -
Is there any way to prevent web.xml from any change like java class?
hi all,
Is there any way to prevent web.xml from any change after making EAR(WAR)?
One can easily make a change in web.xml and redeploy the application to get the result. Now we want to restrict the web.xml as java class for any change after making EAR(or WAR).
Could some one help me to do this?
thanks,
dineshhi,
Not at development level. We want it after deploying the application on server .
We want to create it (web.xml) at tomcat startup (or in any other web/app server ) before loading any context.
Is there any way to run a simple java class(not servlet) on tomcat startup(before initializing the contexts)?
Message was edited by:
DP_java
Message was edited by:
DP_java -
How to generate XML from XML schema
Hi,
I have registered XML schema and I would like to construct XML document for the schema. I wonder it is possible to create an empty instance and then populate it with the data? One solution is to construct the XML with concatenation of the elements but I think it exists more flexible and intelligent way. I read OTN and Metalink samples, documentation and forums users examples but I did not find any appropriate. What is the ordinary way for XML construction? Can you give me some advice? Tank you in advance.
Best regards,
GeorgiThe JAXB Class Generator generates java classes with the
orajaxb utility.
oracle.xml.jaxb.orajaxb -schema <schemafile> -outputDir <outputdir>
The java classes generated have get/set methods to construct an XML document.
thanks,
Deepak -
Hi, I have an XML being added to the page. How can I properly show the information returned by this XML as a webpart?
"<?xml version=\"1.0\" encoding=\"utf-16\"?>\r\n<xml xmlns:s=\"uuid:BDC6E3F0-6DA3-11d1-A2A3-00AA00C14882\" xmlns:dt=\"uuid:C2F41010-65B3-11d1-A29F-00AA00C14882\" xmlns:rs=\"urn:schemas-microsoft-com:rowset\"
xmlns:z=\"#RowsetSchema\">\r\n <s:Schema id=\"RowsetSchema\">\r\n <s:ElementType name=\"row\" content=\"eltOnly\" rs:CommandTimeout=\"30\">\r\n <s:AttributeType
name=\"ows_LinkTitle\" rs:name=\"Title\" rs:number=\"1\">\r\n <s:datatype dt:type=\"string\" dt:maxLength=\"512\" />\r\n </s:AttributeType>\r\n
<s:AttributeType name=\"ows_MetaInfo\" rs:name=\"Property Bag\" rs:number=\"2\">\r\n <s:datatype dt:type=\"int\" dt:lookup=\"true\" dt:maxLength=\"2147483646\"
/>\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows__ModerationStatus\" rs:name=\"Approval Status\" rs:number=\"3\">\r\n <s:datatype dt:type=\"i4\"
dt:maxLength=\"4\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows__Level\" rs:name=\"Level\" rs:number=\"4\">\r\n <s:datatype
dt:type=\"ui1\" dt:maxLength=\"1\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_ID\" rs:name=\"ID\" rs:number=\"5\">\r\n
<s:datatype dt:type=\"i4\" dt:maxLength=\"4\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_UniqueId\" rs:name=\"Unique Id\" rs:number=\"6\">\r\n
<s:datatype dt:type=\"string\" dt:lookup=\"true\" dt:maxLength=\"38\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_owshiddenversion\"
rs:name=\"owshiddenversion\" rs:number=\"7\">\r\n <s:datatype dt:type=\"i4\" dt:maxLength=\"4\" />\r\n </s:AttributeType>\r\n <s:AttributeType
name=\"ows_FSObjType\" rs:name=\"Item Type\" rs:number=\"8\">\r\n <s:datatype dt:type=\"ui1\" dt:lookup=\"true\" dt:maxLength=\"4\" />\r\n </s:AttributeType>\r\n
<s:AttributeType name=\"ows_Created_x0020_Date\" rs:name=\"Created\" rs:number=\"9\">\r\n <s:datatype dt:type=\"datetime\" dt:lookup=\"true\" dt:maxLength=\"8\"
/>\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_Created\" rs:name=\"Created\" rs:number=\"10\">\r\n <s:datatype dt:type=\"datetime\"
dt:maxLength=\"8\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_Title\" rs:name=\"Title\" rs:number=\"11\">\r\n <s:datatype
dt:type=\"string\" dt:maxLength=\"512\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_FileLeafRef\" rs:name=\"Name\" rs:number=\"12\">\r\n
<s:datatype dt:type=\"string\" dt:lookup=\"true\" dt:maxLength=\"512\" />\r\n </s:AttributeType>\r\n <s:AttributeType name=\"ows_PermMask\"
rs:name=\"Effective Permissions Mask\" rs:number=\"13\">\r\n <s:datatype dt:type=\"string\" dt:maxLength=\"1073741823\" />\r\n </s:AttributeType>\r\n
<s:AttributeType name=\"ows_Modified\" rs:name=\"Modified\" rs:number=\"14\">\r\n <s:datatype dt:type=\"datetime\" dt:maxLength=\"8\" />\r\n
</s:AttributeType>\r\n <s:AttributeType name=\"ows_FileRef\" rs:name=\"URL Path\" rs:number=\"15\">\r\n <s:datatype dt:type=\"string\" dt:lookup=\"true\"
dt:maxLength=\"512\" />\r\n </s:AttributeType>\r\n </s:ElementType>\r\n </s:Schema>\r\n <rs:data ItemCount=\"3\">\r\n <z:row ows_LinkTitle=\"Google\"
ows_MetaInfo=\"1;#\" ows__ModerationStatus=\"0\" ows__Level=\"1\" ows_ID=\"1\" ows_UniqueId=\"1;#{4A3A8B7A-A5F4-4EB7-9A2D-F8428993F64B}\" ows_owshiddenversion=\"1\" ows_FSObjType=\"1;#0\"
ows_Created_x0020_Date=\"1;#2015-01-26 14:57:59\" ows_Created=\"2015-01-26 14:57:59\" ows_Title=\"Google\" ows_FileLeafRef=\"1;#1_.000\" ows_PermMask=\"0x7fffffffffffffff\" ows_Modified=\"2015-01-26 14:57:59\"
ows_FileRef=\"1;#sites/sp1/Lists/Test/1_.000\" />\r\n <z:row ows_LinkTitle=\"Bing\" ows_MetaInfo=\"2;#\" ows__ModerationStatus=\"0\" ows__Level=\"1\" ows_ID=\"2\" ows_UniqueId=\"2;#{635ADF32-09FD-4EB8-BBDB-68886236677B}\"
ows_owshiddenversion=\"1\" ows_FSObjType=\"2;#0\" ows_Created_x0020_Date=\"2;#2015-01-26 14:58:05\" ows_Created=\"2015-01-26 14:58:05\" ows_Title=\"Bing\" ows_FileLeafRef=\"2;#2_.000\" ows_PermMask=\"0x7fffffffffffffff\"
ows_Modified=\"2015-01-26 14:58:05\" ows_FileRef=\"2;#sites/sp1/Lists/Test/2_.000\" />\r\n <z:row ows_LinkTitle=\"Yahoo\" ows_MetaInfo=\"3;#\" ows__ModerationStatus=\"0\" ows__Level=\"1\"
ows_ID=\"3\" ows_UniqueId=\"3;#{6F0C379B-361B-4DEF-B8BA-305924CA9BBC}\" ows_owshiddenversion=\"1\" ows_FSObjType=\"3;#0\" ows_Created_x0020_Date=\"3;#2015-01-26 14:58:11\" ows_Created=\"2015-01-26 14:58:11\"
ows_Title=\"Yahoo\" ows_FileLeafRef=\"3;#3_.000\" ows_PermMask=\"0x7fffffffffffffff\" ows_Modified=\"2015-01-26 14:58:11\" ows_FileRef=\"3;#sites/sp1/Lists/Test/3_.000\" />\r\n </rs:data>\r\n</xml>"The XML is being bind to a literal, so I should instead of a literal add a XML Viewer dinamically and bind the code?
using (SPSite site = new SPSite(webUrl))
using (SPWeb web = site.OpenWeb())
// Get list
SPList list = web.Lists[listName];
// Get items
SPQuery query;
if (!String.IsNullOrEmpty(viewName))
query = new SPQuery(list.Views[viewName]);
else
query = new SPQuery(list.DefaultView);
SPListItemCollection items = list.GetItems(query);
// Get items in XML
XDocument docXML = XDocument.Parse(items.Xml);
// Get XSLT file
XslCompiledTransform xslt = new XslCompiledTransform();
xslt.Load(XmlReader.Create(web.GetListItem(xsltFilePath).File.OpenBinaryStream()));
// Get Transform
StringBuilder builderResult = new StringBuilder();
TextWriter writer = new StringWriter(builderResult);
xslt.Transform(docXML.CreateReader(), null, writer);
// Display transform
Literal litResult = new Literal();
litResult.Text = builderResult.ToString();
Controls.Add(litResult); <<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<< -
Currently my application uses the following arrays to populate a map with data depending on the user's selection.
<fx:Declarations>
<fx:Array id="fwo1">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
<ammap:MapArea instanceName="SE" title="SWEDEN" value="4447100" customData="{dpSE}"/>
<ammap:MapArea instanceName="CH" title="SWITZERLAND" value="47100" customData="{dpCH}"/>
<ammap:MapArea instanceName="FR" title="FRANCE" value="447100" customData="{dpFR}"/>
</fx:Array>
<fx:Array id="fwo2">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
<ammap:MapArea instanceName="SE" title="SWEDEN" value="2000" customData="{dpSE}"/>
<ammap:MapArea instanceName="CH" title="SWITZERLAND" value="200" customData="{dpCH}"/>
<ammap:MapArea instanceName="FR" title="FRANCE" value="20" customData="{dpFR}"/>
</fx:Array>
</fx:Declarations>
I would like to spin the country data off into one or more external XML files so that rather than being hard coded, the arrays would load the data dynamically.
<fx:Array id="fwo1">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
[[include/loop through data from XML file to create rest of array]]
</fx:Array>
<fx:Array id="fwo2">
<ammap:MapArea instanceName="borders" color="#FFFFFF" mouseEnabled="false"/>
[[include/loop through data from XML file here to create rest of array ]]
</fx:Array>
After much searching, I just haven't quite found an example that will let me make the leap from hard coding to dynamically loading the data (in large part, because of the name space declaration as part of the array element).
Any suggestions would be greatly appreciated. Thanks so much.Hi laurie brown,
////////////////////// XML /////////////////////
<?xml version="1.0" encoding="iso-8859-1"?>
<Data>
<name>Raj</name>
<name>Siva</name>
<name>Babu</name>
<name>Kiran</name>
<name>Girish</name>
</Data>
////////////////////// XML /////////////////////
////////////////////// As 3.0 /////////////////////
package{
import flash.display.MovieClip;
import flash.net.URLLoader;
import flash.net.URLRequest;
import flash.events.Event;
public class XMLDataPush extends MovieClip{
var urlRequest:URLRequest = new URLRequest("data.xml");
var urlLoader:URLLoader = new URLLoader();
var dataArr:Array = new Array();
public function XMLDataPush():void{
urlLoader.load(urlRequest);
urlLoader.addEventListener(Event.COMPLETE, onLoaded);
private function onLoaded(evt:Event):void{
var xml:XML = new XML(evt.target.data);
for(var i:Number = 0; i<xml.children().length(); i++){
dataArr.push(xml.children()[i]);
trace(dataArr + " dataArr" );
////////////////////// As 3.0/////////////////////
If it use for you please mark it correct answer.
Thank you
Siva -
Hello,
I have a little problem creating a DTD from an XML document. The XML document looks the following:
<data name="data1">
<value id="abc" name="value1" />
<value id="def" name="value2" />
<value id="ghi" name="value3" />
</data>
<data name="data2">
<value id="123" name="valueA" />
<value id="456" name="valueB" />
<value id="789" name="valueC" />
</data>
The problem concerns the attribute list of the value element,
on the one hand I could create a DTD like this:
<!ATTLIST value id CDATA #REQUIRED
name CDATA #REQUIRED
>
On the other hand I could do it like this:
<!ATTLIST value id (abc|def|ghi|123|456|789) #REQUIRED
name (value1|value2|value3|valueA|valueB|valueC)
#REQUIRED
>
Now I don't know what's the right way. I would be glad if anybody could give me support for my problem.
Thank you very much,
FindusNo...this is not the solution for my problem. The first problem with the code you posted is that I can create a valid XML document like this:
<data name="data2">
<value id="123" name="value1" />
<value id="456" name="value2" />
<value id="789" name="value3" />
</data>
(Please compare to the lines below in order to recognize the difference)
I want the user to create only documents like this:
<data name="data2">
<value id="123" name="valueA" />
<value id="456" name="valueB" />
<value id="789" name="valueC" />
</data>
So I want to define special attribute pairs in my DTD, like ' the value attribute id="123" works only with the attribute name="valueA"! '
Is it possible to do so ?
Thanx a lot,
Findus -
hi. I have created a simple XML file which contains a hierarchical structure of strings.
Also, I have created a SAXParser to read from the xml.
But I don't know how to put this structure in a JTree.
I don't want the tree to appear on my screen. I just want to access certain nodes at different times.
Any help?Hello,
If it's not to display it, you certainly don't need a JTree to store your data.
Maybe you need to use a DOMParser instead but that shouldn't prevent you from building a more appropriate data model. -
Create index from xml documets
When i run the procedure that make index from xml documets,
I meet error when find a ctrl character (^).
I used the org.xml.sax.parser class.
How do I do for resolving this problem?the error is: org.xml.sax.SAXParseException: An invalid XML character (Unicode: 0x1b) was found in the element content of the document
-
I want to generate a Excel file from XML without using POI .How can i do this
roberttuty wrote:
any sample code availableUndoubtedly -
links.xml contains links for page1, page2
links.xml
|
+-- page1.xml
|
+-- page2.xml
I try:
<mx:Button click="loadXML2({ getField( XML(
linksItems.currentItem ), how1Link ) });" label="Link" />
Debugger says:
Error: Repeater is not executing.
at mx.core::Repeater/get currentItem()
at LinkFromXML2/___LinkButton1_click()
<!-- File: links.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<item>
<dc:title>Page 1</dc:title>
<dc:link>page1.xml</dc:link>
</item>
<item>
<dc:title>Page 2</dc:title>
<dc:link>page2.xml</dc:link>
</item>
</rdf:RDF>
<!-- File: page1.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 1</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: page2.xml -->
<?xml version="1.0" encoding="UTF-8"?>
<rdf:RDF xmlns="
http://web.resource.org/cc/"
xmlns:dc="
http://purl.org/dc/elements/1.1/"
xmlns:rdf="
http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<dc:Work>
<dc:title>Page 2</dc:title>
</dc:Work>
</rdf:RDF>
<!-- File: LinkFromXML.mxml -->
<?xml version="1.0" encoding="utf-8"?>
<mx:Application xmlns:mx="
http://www.adobe.com/2006/mxml"
layout="absolute"
creationComplete="loadXML('links.xml');">
<mx:Script>
<![CDATA[
import mx.collections.XMLListCollection;
public var pathxml:String;
public var pathxml2:String;
private var how:Namespace = new Namespace("
http://web.resource.org/cc/");
private var dc:Namespace = new Namespace("
http://purl.org/dc/elements/1.1/");
[Bindable]
private var how1Title:QName = new QName(dc, "title");
[Bindable]
private var how1Link:QName = new QName(dc, "link");
[Bindable]
private var how2Title:QName = new QName(dc, "title");
[Bindable]
private var how1externalXML:XMLListCollection;
[Bindable]
private var how2externalXML:XMLListCollection;
private function loadXML(pathxml):void {
trace (pathxml);
var loader:URLLoader = new URLLoader();
var request:URLRequest = new URLRequest(pathxml);
loader.load(request);
loader.addEventListener(Event.COMPLETE, onComplete);
private function loadXML2(pathxml2):void {
var loader2:URLLoader = new URLLoader();
var request2:URLRequest = new URLRequest(pathxml2);
loader2.load(request2);
loader2.addEventListener(Event.COMPLETE, onComplete2);
private function onComplete(event:Event):void {
var loader:URLLoader = URLLoader(event.target);
var how1Items:QName = new QName(how, "item");
var dataXML:XML = XML( loader.data );
dataXML.addNamespace( dc );
var how1base:XMLList = dataXML.descendants( how1Items
how1externalXML = new XMLListCollection( how1base );
private function onComplete2(event:Event):void {
var loader2:URLLoader =
URLLoader(event.target);
var how2Items:QName = new QName(dc, "Work");
var dataXML:XML = XML( loader2.data );
dataXML.addNamespace( dc );
var how2base:XMLList = dataXML.descendants( how2Items
how2externalXML = new XMLListCollection( how2base );
private function getField( itemXML:XML,
field:QName):String {
return itemXML.descendants( field ).toString();
]]>
</mx:Script>
<mx:Canvas id="HowView" backgroundColor="#FFFFCC"
label="How"
width="100%" height="100%">
<mx:HBox width="100%" height="100%">
<mx:VDividedBox width="400" height="100%" id="how1Box"
backgroundColor="#B9C5A0">
<mx:Repeater width="80%" id="linksItems"
dataProvider="{ how1externalXML }">
<mx:VBox width="80%" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:LinkButton click="loadXML2('{getField( XML(
linksItems.currentItem ), how1Link )}')" label="{ getField( XML(
linksItems.currentItem ), how1Title) }" />
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
<mx:VDividedBox width="100%" height="100%" id="how2Box"
backgroundColor="#6BA1A3">
<mx:Repeater width="100%" id="workItems"
dataProvider="{ how2externalXML }">
<mx:VBox width="534" horizontalAlign="center"
creationCompleteEffect="Fade">
<mx:Label text="{ getField( XML(
workItems.currentItem ), how2Title) }" color="#000000"/>
</mx:VBox>
</mx:Repeater>
</mx:VDividedBox>
</mx:HBox>
</mx:Canvas>
</mx:Application>"Cole_62" <[email protected]> wrote in
message
news:gd2q5r$f08$[email protected]..
> no i dont think this will work because i need to iterate
through each
> <item> in
> the XML...below is an exmaple of possible tree structure
of the XML:
> channel
> -->item1
> ----->title
> ----->imgs
> --------->imgUrl
> --------->imgUrl
> -->item2
> ----->title
> ----->imgs
> ---------->imgUrl
> -->item3
> ------>title
> ------>imgs
> ----------->(no imgs)
>
> i thought to handle this using something like the
ATTACHED CODE below:
>
> ...i need to be able to go through each <item> and
<imgUrl> (because i
> dont
> know how many (if any) there are!) sorry if my PHP
background shines
> through!
>
> THANKS!
>
> <mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
> <mx:HBox>
> <mx:Text text="{feed.currentItem.title}"/>
> <mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
> <!-- PSEUDO CODE I NEED HELP RESOLVING:
> if ("{item.currentItem.imgURL}")
> -->
> <mx:Image source="{item.currentItem.imgUrl}"/>
> </mx:Repeater>
> </mx:HBox>
> </mx:Repeater>
How bout
<mx:Repeater id="feed"
dataProvider="{XML.channel.item}">
<mx:HBox>
<mx:Text text="{feed.currentItem.title}"/>
<mx:Repeater id="item"
dataProvider="{feed.currentItem.imgs}">
<mx:Image
source="{item.currentItem.imgURL.length()>0?item.currentItem.imgURL:null}"
includeInLayout="{item.currentItem.imgURL.length()>0}"/>
</mx:Repeater>
</mx:HBox>
</mx:Repeater> -
HI,
is there any possibilty to create a relational table from a XML schema?Can you use a schema when we compose XML doc from Database tables?
Actually, I'm using SQL Server (sorry, wrong forum). But, I thought a Java tool would have a solution for me.
Maybe you are looking for
-
ReInstallation of iTunes/iPod Updating
Here's the deal: My hard drive had to be replaced because of an unexpected meltdown. Luckily, I had all my songs on my ipod, so I didn't lose my music. However, now that I've installed iTunes onto my new hard drive and retrieved my purchased music fr
-
Hi, Can i give the BP number range as external for the org units created in org model, so that i can give an external number while creating the org unit in the org model. thanks, Sarat.
-
Hello, For more detail of my question: I have problem on outbound PO, I am using the msg type ORDERS to generate the NEW PO (this is ok) and try to activate the msg type ORDCHG to handle the PO Changes. I use the same Output Type for the ORDERS & ORD
-
How can I use eCompanion in the Author mode with the visual editor in Firefox?
Our college uses eCompanion, but the current platform on works with the visual editor in the XP version of the Windows operating system. Online Chat help said that using Firefox with the Xihna Here plugin was a successful work around. I am unable to
-
Is it safe???????//
Is it safe for me to download my update or should I still wait awhile?