lordiano
asked on
Xerces Parser Help needed URGENT
Hi, I am trying to write a parser that can parse a XML file, and then use RSS to make a feed of my own XML schemas.
I need help in the Xerces XML parser part. Does anyone have sample code for using Xerces XML parser in parsing a XML file, by tagnames ..etc , or maybe tell me how I can parse XML file such as :
<RootNode>
<List name = "something">
<Item>item a</Item>
<Description>Something</De scription>
<Prices>
<Price>10</Price>
<Price>11</Price>
</Prices>
</List>
</RootNode>
Where i will have multiple List,
I want to parse the List-Name, and the Item, description, prices(and all the individual Price)
The xml file can be located on disk or on web.
I read up on the RSS feed creation on java.sun.com especially the rome library.
How do I create feed that can be displayed as :
<List name = "something">
<Item>item a</Item>
<Description>Something</De scription>
<Price>something</Price>
</List>
Thanks for your help,
if you have sourcecode and would rather like to email please email to me at
<e-mail removed from Venabili>
(If you do email please let me know you emailed)
I need help in the Xerces XML parser part. Does anyone have sample code for using Xerces XML parser in parsing a XML file, by tagnames ..etc , or maybe tell me how I can parse XML file such as :
<RootNode>
<List name = "something">
<Item>item a</Item>
<Description>Something</De
<Prices>
<Price>10</Price>
<Price>11</Price>
</Prices>
</List>
</RootNode>
Where i will have multiple List,
I want to parse the List-Name, and the Item, description, prices(and all the individual Price)
The xml file can be located on disk or on web.
I read up on the RSS feed creation on java.sun.com especially the rome library.
How do I create feed that can be displayed as :
<List name = "something">
<Item>item a</Item>
<Description>Something</De
<Price>something</Price>
</List>
Thanks for your help,
if you have sourcecode and would rather like to email please email to me at
<e-mail removed from Venabili>
(If you do email please let me know you emailed)
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
When I create Feed using ROME library, How can i create it so that it will have custome tag names?
I am creating it like :
entry = new SyndEntryImpl();
entry.setTitle("Rome v0.1");
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
description = new SyndContentImpl();
description.setType("appli cation/xml ");
description.setValue("Init ial release of Rome");
entry.setDescription(descr iption);
entries.add(entry);
...
but this would be displayed as
<entry>
<title> .... </title>
<link>.... </link>
<summary type = ............../>
</entry>
Is there a way I can rename the tag "entry" to something else?
and is there a way I can create custom tag other than title, link, entry..???
I will split points accordingly THANKS a lot for the help
I am creating it like :
entry = new SyndEntryImpl();
entry.setTitle("Rome v0.1");
entry.setLink("http://wiki.java.net/bin/view/Javawsxml/Rome01");
description = new SyndContentImpl();
description.setType("appli
description.setValue("Init
entry.setDescription(descr
entries.add(entry);
...
but this would be displayed as
<entry>
<title> .... </title>
<link>.... </link>
<summary type = ............../>
</entry>
Is there a way I can rename the tag "entry" to something else?
and is there a way I can create custom tag other than title, link, entry..???
I will split points accordingly THANKS a lot for the help
Check the dtd or schema for the xml used - that will tell you what you can and can't use
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Please do not post your e-mail in questions -- all the communication should be lead on the site. I removed it from here.
Thanks
Venabili
Java Page Editor