XML Parser returning XML content
This probably seems like overkill..
Im building a JSP that reads in XML and parses it. I then need to filter for specific values in the XML, and return a chunk of the XML to the output stream.
So far I've got..
//set-up in and content-type
FileInputStream file = new FileInputStream (getServletContext().getRealPath("/games_arcade/xml/game_marketing_content.xml"));
//response.setContentType("text/xml");
//parse the request
Document doc = null ;
try {
DocumentBuilderFactory docBuilderFact = DocumentBuilderFactory.newInstance();
DocumentBuilder docBuilder = docBuilderFact.newDocumentBuilder();
doc = docBuilder.parse(file);
out.println("Go on ya good thing!!!");
} catch (ParserConfigurationException pcEx) {
throw new ServletException("jaxp not configured!", pcEx);
//get needed data from the xml
NodeList games = doc.getElementsByTagName("game");
out.println(output.toString());
Now Im lost. All the requisites are there, imports etc, Im just stuck with filtering the NodeList.
Or am I completely wrong with this approach?
Any help greatly appreciated.
thanks!
Stephen
Hi,
thanks for the replyand suggestions. Have a bit of an issue with this method, this method (due to technical limitations) is completely JSP, using a standard iPlanet 6.1 classpath. I cant deploy WAR's (and cant use taglibs). Xpath/XSL would be ideal, but how do I write the output as XML?
So are you suggesting
<xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output method="html"/>
<xsl:template match="/">
<xsl:for-each select="games/game">
<xsl:if test="@id = $GAMEID">
... output the xml node using value-of's etc...
</xsl:if>
</xsl:for-each>
</xsl:template>
</xsl:stylesheet>Cheers Dr Clap!
Stephen
Similar Messages
-
How to read XML content from IPortalComponentRequest and parse them
Hi ,
I have a portal application.The application has 2 components(Comp1,comp2).
Comp1 is JspDynpage and Comp2 is AbstractPortalComponent.
Comp1- has a iframe element which point to the external url and has a parameter return_url.
retrun_url has a value as url to Comp2(http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp)
When an event occurs in the external site,i suppose to receive XML content in return_url(ie Comp2),how can i check using the request if the received content is XML and how do i parse them.
I have already seen blogs from Prakash singh in which it refers a xml fixed location in webserver.Hi Detlev,
i am reposting this once again as the previous
reply didnt align good.
Thanks for your reply.The scenario is that
My portal application has to communicate with external GIS(Graphical information system)
service provider client application.
They say that i have to use iframe in my portal application.
Here is the snipet of the iframe tags.
<iframe
id="Nedbrowser"
name="Nedbrowser"
width="100%"
height="100%"
frameborder="no"
marginheight="0"
marginwidth="0"
scrolling="no"
style="position:absolute; top:0; left:0; width:800; height:400; z-index:100; visibility:visible"
src="http://nbg.nedg.nl/nbgint/NBG_INT_main.asp?action=CHART&datasource=NBGMV&product=INTERNET&size_x=300&size_y=300&result_frame=Results&
result_url=http://ibm0343:50000/irj/servlet/prt/portal/prtroot/NewUrlProj.NewUrlComp&
default_centre_x=256000&default_centre_y=471000&default_width=0.5">
</iframe>
<iframe
id="Results"
name="Results"
width="100%"
height="100%"
frameborder="no"
marginheight="0"
marginwidth="0"
scrolling="no"
style="position:absolute; top:400; left:0; width:800; height:200; z-index:100; visibility:visible"
src="about:blank">
</iframe>
When my portal application is started, comes the GIS map in the iframe with in my portal application.
When the user clicks in the area of the map,Gis application returns xml data to the return_url.
The reurn_url is my PortalAbstractComponent in which i have to parse the xml and use it for further processing in R3 system. -
Does JMS parse xml content in TextMessages
Hi
I am working on WLS 6.1sp2 and I am using jms TextMessage type of message to
send XML messages from one subsystem to another. I have added an XML registry
for my version of XML parser. Now I do not have any entries for the entity declarations
nor for the parser entries in the registry.
When I send in an XML message in a TextMessage envelope I find the following
errors in the log.
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
ment.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
r between the beginning of the document and its root element.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
Failed to retrieve SYSTEM id. The root element is required in a well-formed docu
ment.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
r between the beginning of the document and its root element.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
Failed to retrieve root tag. The root element is required in a well-formed docum
ent.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory class
specified in the Server console. Invalid parameters: at least one of publicId,
s
ystemId, rootTag must be non-null>
[ChangeAwareClassLoader] : Name is : META-INF/services/org.apache.xerces.xni.par
ser.XMLParserConfiguration
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document. Failed
to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number of cha
r between the beginning of the document and its root element.>
<Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML document.
Failed to retrieve PUBLIC id. The root element is required in a well-formed docu
ment.>
Now from the logs I understand that the message is being parsed and since the
parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since I am
using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also this
is not logged by any component of my subsystems, this is a weblogic XML Service
log and when I trace through the code I find that it comes up after the first
subsystem sends the message and before the second subsystem receives it.
The question then is does JMS parse XML content in TextMessages and if so how
can I disable that parsing?
Thanks
Sandeep
JMS does not automatically parse TextMessages. Check the XML declaration in
your application's deployment descriptors. That's often the source of this
error.
FYI, you can use XMLMessage for xml payloads. As far as I can remember, the
XMLMessage is an extension of the TextMessage with xml parsing built in.
Adarsh
"Sandeep Nayak" <[email protected]> wrote in message
news:[email protected]...
>
> Hi
>
> I am working on WLS 6.1sp2 and I am using jms TextMessage type of message
to
> send XML messages from one subsystem to another. I have added an XML
registry
> for my version of XML parser. Now I do not have any entries for the entity
declarations
> nor for the parser entries in the registry.
>
> When I send in an XML message in a TextMessage envelope I find the
following
> errors in the log.
>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
document.
> Failed to retrieve PUBLIC id. The root element is required in a
well-formed docu
> ment.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
Failed
> to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
of cha
> r between the beginning of the document and its root element.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
document.
> Failed to retrieve SYSTEM id. The root element is required in a
well-formed docu
> ment.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
Failed
> to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
of cha
> r between the beginning of the document and its root element.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
document.
> Failed to retrieve root tag. The root element is required in a well-formed
docum
> ent.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Could not instantiate factory
class
> specified in the Server console. Invalid parameters: at least one of
publicId,
> s
> ystemId, rootTag must be non-null>
> [ChangeAwareClassLoader] : Name is :
META-INF/services/org.apache.xerces.xni.par
> ser.XMLParserConfiguration
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to open XML document.
Failed
> to retrieve PUBLIC id or SYSTEM id from the document. Decrease the number
of cha
> r between the beginning of the document and its root element.>
> <Jun 9, 2003 3:56:57 PM PDT> <Error> <XML> <Failed to parse given XML
document.
> Failed to retrieve PUBLIC id. The root element is required in a
well-formed docu
> ment.>
>
> Now from the logs I understand that the message is being parsed and since
the
> parser does not find any PUBLIC ID or SYSTEM id it dumps the error, since
I am
> using schemas there is none of the PUBLIC and SYSTEM ids in my xml, also
this
> is not logged by any component of my subsystems, this is a weblogic XML
Service
> log and when I trace through the code I find that it comes up after the
first
> subsystem sends the message and before the second subsystem receives it.
>
> The question then is does JMS parse XML content in TextMessages and if so
how
> can I disable that parsing?
>
> Thanks
>
> Sandeep
-
Hello!
I am working on a MHP-application that contacts a server and loads an XML-file, but I have problems, sorting and displaying the XML-content in my Xlet.
I am using nanoXML to parse the file and via the debug-output of my STB (or the IRT-SW-box) I can see, that this is succesful - but I have no idea how to fill a text-area with the content of my XML-file.
Has anybody done something like that? And is it possible to write XML-files on a server via the back channel? Maybe with FTP?
Thanks a lot!To answer the other part of the question, it is possible to write files to a server over the return channel. You will need to implement the protocol yourself, however, so in the FTP example you would have to include a simple FTP client in your application.
Depending on your needs, you may want something more secure than FTP, but this is obviously a design decision for your project.
Steve -
Fm or class existing for fetching xml contents from a file using abap ?
Hi,
I need to fetch an xml file in a string of type xstring. I am using class cl_gui_frontend_services=>gui_upload.
This returns me content in table format, than i am planning to conver to xstring.
Is there any better approach or any existing function module any one know of ?
thanks
Regards
PoojaHi Pooja,
You can try out this program to read the XML file using abap.
*& Report ZXMLTOITAB *
REPORT ZXMLTOITAB .
TYPE-POOLS: ixml.
TYPES: BEGIN OF t_xml_line,
data(256) TYPE x,
END OF t_xml_line.
DATA: l_ixml TYPE REF TO if_ixml,
l_streamfactory TYPE REF TO if_ixml_stream_factory,
l_parser TYPE REF TO if_ixml_parser,
l_istream TYPE REF TO if_ixml_istream,
l_document TYPE REF TO if_ixml_document,
l_node TYPE REF TO if_ixml_node,
l_xmldata TYPE string.
DATA: l_elem TYPE REF TO if_ixml_element,
l_root_node TYPE REF TO if_ixml_node,
l_next_node TYPE REF TO if_ixml_node,
l_name TYPE string,
l_iterator TYPE REF TO if_ixml_node_iterator.
DATA: l_xml_table TYPE TABLE OF t_xml_line,
l_xml_line TYPE t_xml_line,
l_xml_table_size TYPE i.
DATA: l_filename TYPE string.
PARAMETERS: pa_file TYPE char1024 DEFAULT 'c:\temp\orders_dtd.xml'.
* Validation of XML file: Only DTD included in xml document is supported
PARAMETERS: pa_val TYPE char1 AS CHECKBOX.
START-OF-SELECTION.
* Creating the main iXML factory
l_ixml = cl_ixml=>create( ).
* Creating a stream factory
l_streamfactory = l_ixml->create_stream_factory( ).
PERFORM get_xml_table CHANGING l_xml_table_size l_xml_table.
* wrap the table containing the file into a stream
l_istream = l_streamfactory->create_istream_itable( table =
l_xml_table
size =
l_xml_table_size ).
* Creating a document
l_document = l_ixml->create_document( ).
* Create a Parser
l_parser = l_ixml->create_parser( stream_factory = l_streamfactory
istream = l_istream
document = l_document ).
* Validate a document
IF pa_val EQ 'X'.
l_parser->set_validating( mode = if_ixml_parser=>co_validate ).
ENDIF.
* Parse the stream
IF l_parser->parse( ) NE 0.
IF l_parser->num_errors( ) NE 0.
DATA: parseerror TYPE REF TO if_ixml_parse_error,
str TYPE string,
i TYPE i,
count TYPE i,
index TYPE i.
count = l_parser->num_errors( ).
WRITE: count, ' parse errors have occured:'.
index = 0.
WHILE index < count.
parseerror = l_parser->get_error( index = index ).
i = parseerror->get_line( ).
WRITE: 'line: ', i.
i = parseerror->get_column( ).
WRITE: 'column: ', i.
str = parseerror->get_reason( ).
WRITE: str.
index = index + 1.
ENDWHILE.
ENDIF.
ENDIF.
* Process the document
IF l_parser->is_dom_generating( ) EQ 'X'.
PERFORM process_dom USING l_document.
ENDIF.
*& Form get_xml_table
FORM get_xml_table CHANGING l_xml_table_size TYPE i
l_xml_table TYPE STANDARD TABLE.
* Local variable declaration
DATA: l_len TYPE i,
l_len2 TYPE i,
l_tab TYPE tsfixml,
l_content TYPE string,
l_str1 TYPE string,
c_conv TYPE REF TO cl_abap_conv_in_ce,
l_itab TYPE TABLE OF string.
l_filename = pa_file.
* upload a file from the client's workstation
CALL METHOD cl_gui_frontend_services=>gui_upload
EXPORTING
filename = l_filename
filetype = 'BIN'
IMPORTING
filelength = l_xml_table_size
CHANGING
data_tab = l_xml_table
EXCEPTIONS
OTHERS = 19.
IF sy-subrc <> 0.
MESSAGE ID sy-msgid TYPE sy-msgty NUMBER sy-msgno
WITH sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
ENDIF.
* Writing the XML document to the screen
CLEAR l_str1.
LOOP AT l_xml_table INTO l_xml_line.
c_conv = cl_abap_conv_in_ce=>create( input = l_xml_line-data
replacement = space ).
c_conv->read( IMPORTING data = l_content len = l_len ).
CONCATENATE l_str1 l_content INTO l_str1.
ENDLOOP.
l_str1 = l_str1+0(l_xml_table_size).
SPLIT l_str1 AT cl_abap_char_utilities=>cr_lf INTO TABLE l_itab.
WRITE: /.
WRITE: /' XML File'.
WRITE: /.
LOOP AT l_itab INTO l_str1.
REPLACE ALL OCCURRENCES OF cl_abap_char_utilities=>horizontal_tab
IN
l_str1 WITH space.
WRITE: / l_str1.
ENDLOOP.
WRITE: /.
ENDFORM. "get_xml_table
*& Form process_dom
FORM process_dom USING document TYPE REF TO if_ixml_document.
DATA: node TYPE REF TO if_ixml_node,
iterator TYPE REF TO if_ixml_node_iterator,
nodemap TYPE REF TO if_ixml_named_node_map,
attr TYPE REF TO if_ixml_node,
name TYPE string,
prefix TYPE string,
value TYPE string,
indent TYPE i,
count TYPE i,
index TYPE i.
node ?= document.
CHECK NOT node IS INITIAL.
ULINE.
WRITE: /.
WRITE: /' DOM-TREE'.
WRITE: /.
IF node IS INITIAL. EXIT. ENDIF.
* create a node iterator
iterator = node->create_iterator( ).
* get current node
node = iterator->get_next( ).
* loop over all nodes
WHILE NOT node IS INITIAL.
indent = node->get_height( ) * 2.
indent = indent + 20.
CASE node->get_type( ).
WHEN if_ixml_node=>co_node_element.
* element node
name = node->get_name( ).
nodemap = node->get_attributes( ).
WRITE: / 'ELEMENT :'.
WRITE: AT indent name COLOR COL_POSITIVE INVERSE.
IF NOT nodemap IS INITIAL.
* attributes
count = nodemap->get_length( ).
DO count TIMES.
index = sy-index - 1.
attr = nodemap->get_item( index ).
name = attr->get_name( ).
prefix = attr->get_namespace_prefix( ).
value = attr->get_value( ).
WRITE: / 'ATTRIBUTE:'.
WRITE: AT indent name COLOR COL_HEADING INVERSE, '=',
value COLOR COL_TOTAL INVERSE.
ENDDO.
ENDIF.
WHEN if_ixml_node=>co_node_text OR
if_ixml_node=>co_node_cdata_section.
* text node
value = node->get_value( ).
WRITE: / 'VALUE :'.
WRITE: AT indent value COLOR COL_GROUP INVERSE.
ENDCASE.
* advance to next node
node = iterator->get_next( ).
ENDWHILE.
ENDFORM. "process_dom
Regards,
Samson Rodrigues. -
can any one help me to access the xml contents using a servlet or a java code.
eg: there are some tags in xml and i want to access those contents from those tags and display it..
if u can please mail me to:
[email protected]Hi Suresh
I need the same one for my requirement if u have please post to this site or send me an email .
[email protected]
I can able to parsed one structured XML file using SAX
Sample code :
// ===========================================================
// SAX DocumentHandler methods
// ===========================================================
public void startDocument() throws SAXException {
logger.info("Start of document");
public void endDocument() throws SAXException {
logger.info("End of document");
public void startElement(String namespaceURI, String localName, // local
// name
String qualName, // qualified name
Attributes attrs) throws SAXException {
elemName = new String(localName); // element name
if (elemName.equals(""))
elemName = new String(qualName); // namespaceAware = false
tagPosition = TAG_START;
// Set the string for accumulating the text in a tag to empty
elemChars = "";
// If the element name is "row", create a new row instance
// If the element is "indexxid", "ModelPrice", or "ModelSpread",
// the value will be read in the method "characters" and stored.
if (elemName.equals("row")) {
row = new IndexRow();
numRows++;
// logger.info("Number of numRow:"+numRows);
} // end method startElement
public void endElement(String namespaceURI, String simpleName, // simple
// name
String qualName // qualified name
) throws SAXException {
elemName = new String(simpleName);
if (elemName.equals(""))
elemName = new String(qualName); // namespaceAware = false
tagPosition = TAG_END;
String indexId = new String();
Double dblVal = new Double(0);
// If element name is "row", put the current row in the map for row
// instances
if (elemName.equals("row")) {
if (numRows <= 5) { logger.info("Row is: " + row.toString()); }
//ABX
//indexRows.put(row.getIndexxId(), row);
if (family.equals("ABX.HE")){
indexRows.put(row.getIndexREDId(), row);
else {
//CDX ITRXX
indexRows.put(row.getIndexxId(), row);
} else if (elemName.equals("IndexID")) {
row.setIndexxId(elemChars);
else if (elemName.equals("ModelPrice")) {
// Leave double value at default of zero if there are no chars
if (elemChars.trim().length() != 0) {
dblVal = new Double(elemChars);
row.setModelPrice(dblVal);
indexId = row.getIndexxId();
} else if (elemName.equals("ModelSpread")) {
// Leave double value at default of zero if there are no chars
if (elemChars.trim().length() != 0) {
dblVal = new Double(elemChars);
row.setModelSpread(dblVal);
indexId = row.getIndexxId();
} else if (elemName.equals("CompositePrice")) {
// Leave double value at default of zero if there are no chars
if (elemChars.trim().length() != 0) {
dblVal = new Double(elemChars);
row.setCompositePrice(dblVal);
indexId = row.getIndexxId();
} else if (elemName.equals("CompositeSpread")) {
// Leave double value at default of zero if there are no chars
if (elemChars.trim().length() != 0) {
dblVal = new Double(elemChars);
row.setCompositeSpread(dblVal);
indexId = row.getIndexxId();
} else if (elemName.equals("REDCode")) {
row.setRedCode(elemChars);
else if (elemName.equals("Name")) {
row.setRowName(elemChars);
} else if (elemName.equals("Series")) {
row.setSeries(elemChars);
} else if (elemName.equals("Version")) {
row.setVersion(elemChars);
} else if (elemName.equals("Term")) {
row.setTerm(elemChars);
} else if (elemName.equals("Maturity")) {
row.setMaturity(elemChars);
} else if (elemName.equals("OnTheRun")) {
row.setOnTheRun(elemChars);
} else if (elemName.equals("Date")) {
row.setRowDate(elemChars);
} else if (elemName.equals("Depth")) {
row.setDepth(elemChars);
else if (elemName.equals("Heat")) {
// logger.info("Chars for element " + elemName + " are '" +
// elemChars + "'");
// Leave double value at default of zero if there are no chars
if (elemChars.trim().length() != 0) {
dblVal = new Double(elemChars);
row.setHeat(dblVal);
indexId = row.getIndexxId();
// ABX.HE
else if (elemName.equals("IndexREDId")){
row.setIndexREDId(elemChars);
else if (elemName.equals("Coupon")){
row.setCoupon(elemChars);
if (elemName.equals("Ontherun")) {
row.setOnTheRun(elemChars);
} // end method endElement
public void characters(char buf[], int offset, int len) throws SAXException {
// If at end of element, there will be no characters
if (tagPosition == TAG_END) {
return;
// The characteres method may be called more than once
// for an element if the internal buffer fills up.
// Append the characters until the end of the element.
String strVal = new String(buf, offset, len);
elemChars = elemChars + strVal;
} // end method characters
} // end class MarkItIndexLoader
but the problem is i want to parse any XML file means any Elemets would be change any time using SAX .In the above example
else if (elemName.equals("Heat")) {
else if (elemName.equals("IndexREDId")){
} else if (elemName.equals("Maturity")) {
like above I am doing hard code so i don't want hard coding the elements names I want to read any element name and value dynamically.
Dynamically i want to read the root and child elements
EX: I can give any XML file like
Student.XML: <root>..</StName>..</StAge>...</root>
Employee.XML: <root>..</EmpName>..</EmpAge>...</root>
CdCatalog.XML: <root>..</Cdtitle>...</CdNumber>...</root>
I need one java program can ready any type of XML file elements and send to the Database table.
Please any one done like this task please suggest some reference links or books or sample snippet which can help me to develop program in my requirement. -
Catch all error information while validating xml content with xsd schema
Hi experts,
I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below is a part of my java mapping.
XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
parser.setFeature( "http://xml.org/sax/features/validation" , true);
parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); // schema is my schema name
parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends DefaultHandler
parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
// In error handler, I comment all code so as not to throw any exception
public class ParseErrorHandler extends DefaultHandler
public void error(SAXParseException e) throws SAXException
// sSystem.out.println("Error" + e.getMessage());
// throw e;
public void fatalError(SAXParseException e)
// throw e;
// System.out.println("SAP Fatal Error" + e.getMessage());
Unfortunately the program always stopped while catching the first error. Check the below log.
com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
ERRORS :
cvc-simple-type : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
cvc-data : information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is is not valid with respoct to the corresponding simple type definition.
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' is associated with invalid data.
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]/:To[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]/:Header[1]' is not valid with respect to it's complex type definition..
cvc-element : element information item '/:ShipNotice[1]' is not valid with respect to it's complex type definition..
-> com.sap.engine.lib.xml.parser.ParserException:
I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error handler logic? Is there any body can make me get out of this?
Thanks.<h6>Hi experts,
<h6>
<h6>I created a java mapping to validating the input xml content with xsd schema (schema validation). What I want is to catch all <h6>error message to the xml not just the first error. I used SAXParser in sapxmltoolkit.jar to do the schema validation. The below <h6>is a part of my java mapping.
<h6>XMLReader parser = XMLReaderFactory.createXMLReader("com.sap.engine.lib.xml.parser.SAXParser");
<h6>parser.setFeature( "http://xml.org/sax/features/validation" , true);
<h6>parser.setFeature( "http://apache.org/xml/features/validation/schema" , true);
<h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaLanguage", "http://www.w3.org/2001/XMLSchema"); <h6>parser.setProperty("http://java.sun.com/xml/jaxp/properties/schemaSource",this.getClass().getClassLoader().getResourceAsStream(schema)); <h6>// schema is my schema name
<h6>parser.setErrorHandler(new ParseErrorHandler()); // ParseErrorHandler is my own ErrorHandler which extends Default Handler
<h6>parser.parse(new InputSource(new ByteArrayInputStream(sinput.getBytes())));
<h6>
<h6>// In error handler, I comment all code so as not to throw any exception
<h6>public class ParseErrorHandler extends DefaultHandler
<h6>{
<h6> public void error(SAXParseException e) throws SAXException
<h6> {
<h6> // sSystem.out.println("Error" + e.getMessage());
<h6> // throw e;
<h6> }
<h6>
<h6> public void fatalError(SAXParseException e)
<h6> {
<h6> // throw e;
<h6> // System.out.println("SAP Fatal Error" + e.getMessage());
<h6>
<h6> }
<h6>
<h6>}
<h6>
<h6>Unfortunately the program always stopped while catching the first error. Check the below log.
<h6>
<h6>com.sap.engine.lib.xml.parser.NestedSAXParserException: Fatal Error: com.sap.engine.lib.xml.parser.ParserException:
<h6>ERRORS :
<h6>cvc-simple-type : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is not valid, because it's value does not satisfy the constraints of facet 'minLength' with value '1'.
<h6>cvc-data : information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is is not valid with respoct to the corresponding simple type definition.
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]/:CityName[1]' <h6>is associated with invalid data.
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]/:AddressInformation[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]/:PartnerInformation[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]/:To[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item <h6>'/:ShipNotice[1]/:Header[1]' <h6>is not valid with respect to it's complex type definition..
<h6>cvc-element : element information item '/:ShipNotice[1]' is not valid with <h6>respect to it's complex type definition..
<h6> -> com.sap.engine.lib.xml.parser.ParserException:
<h6>
<h6>
<h6>I tried using Xerces and JAXP to do validation, the same error happened. I have no idea on this. Does xi has its own error <h6>handler logic? Is there any body can make me get out of this?
<h6>Thanks. -
Efficient way for Continous Creation of XML Content?
Hi
I have a requirement of creating xml content from the data extraced from a udp packet.
As the packet arrives, i have to generate appropriate xml content from them and keep in the same single xml file.
Problem:
Since the xml file is not a flat file, i can't just append the new contents at the end. So if i have to write into xml file, Each and Every time i have to parse the content as a packet arrives and insert the new content under appropriate parent. I think this is not the most efficient way.
Every time parsing the file may affect cpu time and as the file grows in size, the memory will also be a constraint.
Other options i could think of
* Hold the XML Document Object in memory until a certain event like timeout for receiving packet and write into the xml file at oneshot.
* Serialize the objects containing the extracted packet content to a temp file and after some event, parse and create the xml file at oneshot
Which is the efficient way or is there any design pattern to handle this situation? I am worried about the memory footprint and performance on peak loads
I am planning to use JDOM / SAX Builder for xml creation.
Thank you...Lot's of "maybe" and "I think" and "I'm worried about" in that question, and no "I have found" or "it is the case that". In short, you're worrying too much about problems you don't even know you have. XML is a verbose format anyway, efficiency isn't paramount when dealing with it. Even modestly powered machines can deal with quite a lot of disk I/O these days without noticeable impact. The most efficient thing you can do here is write something that works, and see if you can live with the performance
-
Import of XML file failed in portal using XML Content and Action
Hi Friends,
I am trying to import the simple XML file which is just creating the folder in the PORTAL_CONTENT using XML CONTENT AND ACTIONS which is one way of creating the portal content. GO TO SYSTEM ADMINISTRATION > TRANSPORT > XML CONTENT AND ACTIONS > IMPORT.
The reason for using this import tool is to upload the backend Business roles, which is not not working on our corporate portal. To test the import functionality I used the following xml file (I got this XML file by exporting the test folder in the portal using the same tool)
<GenericCreator author="XML Creator" version="XML Automatic Creation" mode="clean,execute" report.level="success" createMode="1" default.locale="en" ignore="false">
<Context name="portal_content" objectClass="com.sap.portal.pcd.gl.GlContext"></Context> <Property name="parent1" value="pcd:portal_content"/>
<Context name="com.dri.fldr.im" objectClass="com.sap.portal.pcd.gl.GlContext" create_as="0" parent="$">
<Attributes>
<Attribute name="com.sap.portal.pcm.Description" type="text">
<AttributeValue value="" locale=""/>
<Attribute name="administration" type="string">
<AttributeValue value=""/>
</Attribute>
<Attribute name="Inheritance" type="string">
<AttributeValue value="NONFINAL"/>
</Attribute>
</Attribute>
<Attribute name="com.sap.portal.pcm.Title" type="text">
<AttributeValue value="test" locale=""/>
<AttributeValue value="test" locale="en"/>
<Attribute name="administration" type="string">
<AttributeValue value=""/>
</Attribute>
<Attribute name="mandatory" type="string">
<AttributeValue value="true"/>
</Attribute>
<Attribute name="Inheritance" type="string">
<AttributeValue value="NONFINAL"/>
</Attribute>
</Attribute>
</Attributes>
</Context>
</GenericCreator>
SDN BLOCKED THE XML The above XML file works fine in other portal in the landscape but not in corporate portal ( which is freshly build recently).Following error message is display when i am trying to upload the file
Status Name Action Type Comment
General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Failed to extract root node
General Extracting root node E:\usr\sap\EPD\JC00\j2ee\cluster\server0\%USERPROFILE%\AppData\Local\Temp\tmp_masscontent4135391959047431276.xml Parsing failed .
Dont know is there a service/ configurations needs to be done to enable this feature?.
Thanks
Edited by: hammad on Sep 4, 2009 5:48 PM
Edited by: hammad on Sep 4, 2009 5:49 PMThe problem statement is not very clear.
Try following this how to guide [https://www.sdn.sap.com/irj/scn/index?rid=/library/uuid/207a2141-c870-2910-e080-90c920b24f47&overridelayout=true|How-To]
Best Regards,
Prasanna K -
How to create new XML file using retreived XML content by using SAX API?
hi all,
* How to create new XML file using retreived XML content by using SAX ?
* I have tried my level best, but output is coming invalid format, my code is follows,
XMLFileParser.java class :-
import java.io.StringReader;
import java.io.StringWriter;
import javax.xml.transform.OutputKeys;
import javax.xml.transform.Transformer;
import javax.xml.transform.TransformerConfigurationException;
import javax.xml.transform.TransformerException;
import javax.xml.transform.TransformerFactory;
import javax.xml.transform.dom.DOMResult;
import javax.xml.transform.sax.SAXSource;
import javax.xml.transform.sax.SAXTransformerFactory;
import javax.xml.transform.sax.TransformerHandler;
import javax.xml.transform.stream.StreamResult;
import org.w3c.dom.Document;
import org.xml.sax.Attributes;
import org.xml.sax.InputSource;
import org.xml.sax.SAXException;
import org.xml.sax.helpers.XMLFilterImpl;
public class PdfParser extends XMLFilterImpl {
private TransformerHandler handler;
Document meta_data;
private StringWriter meta_data_text = new StringWriter();
public void startDocument() throws SAXException {
void startValidation() throws SAXException {
StreamResult streamResult = new StreamResult(meta_data_text);
SAXTransformerFactory factory = (SAXTransformerFactory) SAXTransformerFactory.newInstance();
try
handler = factory.newTransformerHandler();
Transformer transformer = handler.getTransformer();
transformer.setOutputProperty(OutputKeys.ENCODING, "UTF-8");
transformer.setOutputProperty(OutputKeys.INDENT, "yes");
handler.setResult(streamResult);
handler.startDocument();
catch (TransformerConfigurationException tce)
System.out.println("Error during the parse :"+ tce.getMessageAndLocation());
super.startDocument();
public void startElement(String namespaceURI, String localName,
String qualifiedName, Attributes atts) throws SAXException {
handler.startElement(namespaceURI, localName, qualifiedName, atts);
super.startElement(namespaceURI, localName, qualifiedName, atts);
public void characters(char[] text, int start, int length)
throws SAXException {
handler.characters(text, start, length);
super.characters(text, start, length);
public void endElement(String namespaceURI, String localName,
String qualifiedName) throws SAXException {
super.endElement("", localName, qualifiedName);
handler.endElement("", localName, qualifiedName);
public void endDocument() throws SAXException {
void endValidation() throws SAXException {
handler.endDocument();
try {
TransformerFactory transfactory = TransformerFactory.newInstance();
Transformer trans = transfactory.newTransformer();
SAXSource sax_source = new SAXSource(new InputSource(new StringReader(meta_data_text.toString())));
DOMResult dom_result = new DOMResult();
trans.transform(sax_source, dom_result);
meta_data = (Document) dom_result.getNode();
System.out.println(meta_data_text);
catch (TransformerConfigurationException tce) {
System.out.println("Error occurs during the parse :"+ tce.getMessageAndLocation());
catch (TransformerException te) {
System.out.println("Error in result transformation :"+ te.getMessageAndLocation());
} CreateXMLFile.java class :-
Sax.startDocument();
Sax.startValidation();
Sax.startElement("", "pdf", "pdf", new AttributesImpl());
Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());
String xmp_str = new String(meta_data.getByteArray(),"UTF8");
char[] xmp_arr = xmp_str.toCharArray();
Sax.characters(xmp_arr, 0, xmp_arr.length);
Sax.endElement("", "pdf", "pdf");
Sax.endValidation();
Sax.endDocument();
Sax.endElement("", "basic-metadata", "basic-metadata");* In CreateXMLFile.java
class, I have retreived the xml content in the meta_data object, after that i have converted into character array and this will be sends to SAX
* In this case , the XML file created successfully but the retreived XML content added as an text in between basic-metadata Element, that is, retreived XML content
is not an XML type text, it just an Normal text Why that ?
* Please help me what is the problem in my code?
Cheers,
JavaImranSax.startDocument();
Sax.startValidation();
Sax.startElement("", "pdf", "pdf", new AttributesImpl());
Sax.startElement("", "basic-metadata", "basic-metadata", new AttributesImpl());
String xmp_str = new String(meta_data.getByteArray(),"UTF8");
char[] xmp_arr = xmp_str.toCharArray();
Sax.characters(xmp_arr, 0, xmp_arr.length);
</code><code>Sax.endElement("", "basic-metadata", "basic-metadata");</code>
<code class="jive-code jive-java">Sax.endElement("", "pdf", "pdf");
Sax.endValidation();
Sax.endDocument();
* I HAVE CHANGED MY AS PER YOUR SUGGESTION, NOW SAME RESULT HAS COMING.
* I AM NOT ABLE TO GET THE EXACT OUTPUT.,WHY THAT ?
Thanks,
JavaImran{code} -
Same XML content on more than one page?
(Indesign CC on OSX)
I have a 12-page indesign document in which each page contains a resized version of the same ad. (for placment in a variety of publications)
I have an external xml file that contains master copy. When I link to this file, the copy on the first page functions/updates properly, but when I try to place the xml content into the container frames on any of the other pages, it swaps the content into that new location instead of just placing a duplicate instance of the external data.
I'd like a way to be able to edit master copy externally in an xml file, then have all of my resized ad pages in Indesign update with one press of the 'update all links' button.
Is this possible?I decided to put in a new ID following the first advice, and also as I am making videochat calls between the two playbooks whilst a family member is on vacation borrowing my other one, so they need different IDs.
I would like to mark one answer as a solution but I have two diametrically opposed answers!
so I'll just have to wipe then try and set up my new one with the existing ID when the old one is returned to me and come back. It would be nice to have access to my purchases on both, as per Apple's practice.
Thanks all. -
Ok so I have created this button that expands within a movie clip called "movie1_mc". At frame 12 the button stops expanding and an external XML file loads in 7 subnavigation buttons within a single mc called "button". After the user rolls Off the subnavigation btns the "movie1_mc" button collapses but the laoded xml content is still there. I need to get rid of the XMl content after frame 13 how can I accomplish this?
Below is my coe that loads the XML content:
stop();
function loadXML(loadedX) {
if (loadedX) {
xmlNode = this.firstChild;
image = [];
total = xmlNode.childNodes.length;
for (i=0; i<total; i++) {
image[i] = xmlNode.childNodes[i].childNodes[0].firstChild.nodeValue;
load_pic();
} else {
content = "file not loaded!";
xmlData = new XML();
xmlData.ignoreWhite = true;
xmlData.onLoad = loadXML;
xmlData.load("images.xml");
function load_pic(){
k = Math.floor(Math.random()*total);
picture_1.holder.loadMovie(image[k], 1);
//Store Button Position
var yPosition:Number = 210;
var xPosition:Number = 110;
//Declare New XML Object
var myXML:XML = new XML();
//Set Flash to ignore the XML file's white space
myXML.ignoreWhite = true;
//Declare new Array to store the links from the XML file
var links:Array = new Array();
//Declare new Array to store the names from the XML file
var names:Array = new Array();
//Set XML onLoad function
myXML.onLoad = function(){
//Set varible to store the XML childNodes
//This allows you to get the number of buttons in the XML file.
//You'll use this tell flash how many times to loop the for loop.
var linkname:Array = this.firstChild.childNodes;
//Set a for loop
for(i=0;i<linkname.length;i++){
//Push the button name into the names Array
names.push(linkname[i].attributes.NAME);
//Push the button link into the links Array
links.push(linkname[i].attributes.LINK);
//Attach the button Movie Clip from the libray give it an instance name and place it on the next highest level
_root.attachMovie("button","btn"+i,_root.getNextHighestDepth());
//Set the y position of the buttons
_root["btn"+i]._x = xPosition;
//Increace the varible yPosition 15 pixel each time the loop runs to place each button under each other
xPosition = xPosition+0
_root["btn"+i]._y = yPosition;
//Increace the varible yPosition 15 pixel each time the loop runs to place each button under each other
yPosition = yPosition+30;
//Place the button name from names Array into the blackTxt text box
_root["btn"+(i)].blackTxt.Txt.text = (names[i]);
//Place the button name from names Array into the whiteTxt text box
_root["btn"+(i)].whiteTxt.Txt.text = (names[i]);
//Assign the btnOver function to the button onRollOver state.
_root["btn"+(i)].onRollOver = btnOver;
//Assign the btnOut function to the button onRollOut state.
_root["btn"+(i)].onRollOut = btnOut;
//Assign the btnRelease function to the button onRelease state.
_root["btn"+(i)].onRelease = btnRelease;
//Load the XML file
myXML.load("links.xml");
//Button Over function
function btnOver(){
//This referse to the current button the mouse is over
//Go To And Stop frame 2 of the current button the mouse is over
this.gotoAndStop(2);
//Button Out function
function btnOut(){
//Go To And Stop frame 3 of the current button the mouse rolls out from
this.gotoAndStop(3);
//Button Release function
function btnRelease(){
//Set a varible named currentBtn equal to the instance name of the current button the mouse clicked on
var currentBtn:String = this._name;
//Set a varible named currentIndex equal to the varible currentBtn and the characters between 3rd letter and 5th of that string.
//This will return a number between 0 and the total number of buttons
var currentIndex:String = currentBtn.substring(3,5);
//Get the URL from the links Array
//Use the currentIndex varible as the index number
getURL(links[currentIndex]);
Any help with this is greatly appreciated
Cheers-
Graphic GraemeHi
Thanks al for ur replies.
Actually my requirement is to send email with some xml data in the body (like failed records to show dat dese are all the records without necessary information).
@Eric,
Using ora:getContentAsString(XMLElement) i only received a blank email without any content. I even tried to write the xml content in a file and used ora:doc() . Even then the body of the email is blank. Dunno wat i am missing here.
@pavan4s
I am literally new to bpel. Can u please elaborate or send some links to use xsl in email body?
Edited by: friendsforever on Oct 11, 2010 2:35 AM
Edited by: friendsforever on Oct 11, 2010 2:36 AM -
Business Intelligence and Analysis capabilities on XML content
On page 99 of Oracle XML DB Basic Demonstration pdf doc it si said: "Even though Business Intelligence, such as rollup and cube, are not XML aware they are able to process XML content exposed through a relational view"
is this true ? if so, how can i create a cube and/or
dimension from XML content exposed through a relational view ?
Unfortunately, Oracle 9i does not allow me to build materialzed views from XML content (Oracle objects)
Thanks in advance,The intention of the documentation maybe that anything you can query using SQL, you can expose as XML. For instance, you could create an analytic workspace, expose it through views, query the views through SQL, and return the results as XML.
-
POST http(s) request with xml content in Power Query
I have a POST http request which works good in HttpRequester (Firefox plugin). I know that it is possible to call POST request in Power Query but cannot find working solution. Here is the original request:
POST https://svcs.ebay.com/FeedbackService
X-EBAY-SOA-OPERATION-NAME: createDSRSummaryByPeriod
X-EBAY-SOA-SERVICE-VERSION: 1.0.0
X-EBAY-SOA-SERVICE-NAME: FeedbackService
X-EBAY-SOA-APP-NAME: ***
X-EBAY-SOA-SITEID: 0
X-EBAY-SOA-SECURITY-TOKEN: ***
Content-Type: text/xml
<?xml version="1.0" encoding="UTF-8"?>
<createDSRSummaryByPeriodRequest xmlns="http://www.ebay.com/marketplace/services">
<dateRange>
<dateFrom>2013-12-01T00:00:00.000Z</dateFrom>
<dateTo>2013-12-31T23:59:59.999Z</dateTo>
</dateRange>
<dateRangeEventType>ListingDate</dateRangeEventType>
</createDSRSummaryByPeriodRequest>
Power Query WebContent() function is capable to handle headers and xml content, however, there is no any documentation about its syntax.
In Power Query I use this request:
= Xml.Tables(Web.Contents(“https://svcs.ebay.com/FeedbackService”,
[Headers =[" X-EBAY-SOA-OPERATION-NAME"= "createDSRSummaryByPeriod",
"X-EBAY-SOA-SERVICE-VERSION="1.0.0",
"X-EBAY-SOA-SERVICE-NAME"="FeedbackService",
"X-EBAY-SOA-APP-NAME"="***","X-EBAY-SOA-SITEID"="0",
"X-EBAY-SOA-SECURITY-TOKEN"="***"],
Content=["<?xml version="1.0" encoding="UTF-8"?>
<createDSRSummaryByPeriodRequest xmlns="http://www.ebay.com/marketplace/services">
<dateRange>
<dateFrom>2013-12-01T00:00:00.000Z</dateFrom>
<dateTo>2013-12-31T23:59:59.999Z</dateTo>
</dateRange>
<dateRangeEventType>ListingDate</dateRangeEventType>
</createDSRSummaryByPeriodRequest>"]]))
However, it returns "Expression.SyntaxError: Invalid identifier." Maybe anyone has at least examples of analogous working syntax?Task is solved. First of all I updated PowerQuery since previous version does not support Headers option for Web.Contents function. Here is a correct syntax:
=Xml.Document(Web.Contents("https://api.ebay.com/ws/api.dll",[Headers=[#"X-EBAY-API-COMPATIBILITY-LEVEL"= "871",#"X-EBAY-API-SITEID"="0",#"X-EBAY-API-CALL-NAME"="GetMyeBaySelling",#"CONTENT-TYPE"="text/xml"], Content=Text.ToBinary("<?xml version="&Character.FromNumber(34)&"1.0"&Character.FromNumber(34)&" encoding="&Character.FromNumber(34)&"utf-8"&Character.FromNumber(34)&"?>
<GetMyeBaySellingRequest xmlns="&Character.FromNumber(34)&"urn:ebay:apis:eBLBaseComponents"&Character.FromNumber(34)&">
<RequesterCredentials><eBayAuthToken>***</eBayAuthToken></RequesterCredentials><SoldList><DurationInDays>60</DurationInDays><Pagination><EntriesPerPage>100</EntriesPerPage><PageNumber>1</PageNumber></Pagination></SoldList></GetMyeBaySellingRequest>")])) -
Display XML content in af:outputText
Hi
I need to display a large xml content which is returned as a String in <af:outputText>. I had read it works by setting the property escape of <af:outputText> to TRUE. Its not working. i need to render the raw XML content in my panelgrouplayout . How to go about this??
Thanks
Chayatry using af :outputFormatted.
Why do you need to render it in a panelGroupLayout btw ? -
How to display the xml content into my datagrid
Hi Experts,
i have created a webservice for sales quotation through DI-Server.iam able to add a new sales quotation through my coding & iam able to get the sales quotation based on the DOcEntry in an *XML file*.
The xml file that i got using DOCENTRY is in this way:--
<?xml version="1.0" encoding="utf-8" ?>
- <BOM>
- <BO>
- <AdmInfo>
<Object>oRecordset</Object>
</AdmInfo>
- <OQUT>
- <row>
<DocEntry>8</DocEntry>
<DocNum>8</DocNum>
<DocDate>20080715</DocDate>
<DocDueDate>20080815</DocDueDate>
<CardCode>C0003</CardCode>
<CardName>HP India</CardName>
<DocTotal>14500.000000</DocTotal>
<ItemCode>A00006</ItemCode>
<Dscription>HP Officejet 7310 All-in-One</Dscription>
<Quantity>1.000000</Quantity>
<Price>14500.000000</Price>
<Currency>INR</Currency>
<DiscPrcnt>10.000000</DiscPrcnt>
<LineTotal>14500.000000</LineTotal>
</row>
</OQUT>
</BO>
</BOM>
Now the problem is from this xml content i should display the values in my datagrid like:
DocEntryCardCodeDocDueDateItemCodeDscriptionQtyTotal
8--C000320081116--A00006-HP-off jet-2 --- 1000
can anybody suggest me some ideas that how to get the SPECIFIED values into my datagrid...........
regards,
shangai.hi vincent,
Thanks for your reply.iam unable to understand these lines in your code..iam working in vb.net
public static DataSet GetDataSetFromXML(XmlNode XMLNode)
grid.DataSource = GetDataSetFromXML(Result.SelectSingleNode(xpath_string));
this is my coding....it's throwing an error when i declare like this
Public Sub GetDataSetFromXML(ByVal XmlNode)
Dim ds As New DataSet
Dim reader As XmlNodeReader
reader = New XmlNodeReader(XmlNode)
ds.ReadXml(reader)
reader.Close()
'Return ds --->(error with syntax)
End Sub
DataGrid1.DataSource = GetDataSetFromXML(oXmlReply.SelectSingleNode("//DocDueDate"))
DataGrid1.DataBind()
regards,
shangai
Maybe you are looking for
-
I've got someone else's photos on my photostream
My photostream has disappeared and I now have someone else's photos in my photostream. How do I get rid of them and get my photos back. I Haven't updated my software or lost any of my apple devices so I don't know why this is happening.
-
Zip File for iWorkplace Servlet Sample Invalid
I've download the sample source iWorkplace2.zip and tried to unzip it but fail. It seems that the file is corrupted (about 3M file size) Can Oracle Team help ? Rgds, Edward
-
Hi, I need to get the list of mtls which have a certain exception mesage against them. How do I get it ? Is there any table which stores this data ? Dosnet MDTC or MDKP store just 2 exception messages ? Thanlks
-
Adobe Access Server for Protected Streaming Configuration Problem
I cannot get the Adobe Access Server for Protected Streaming sample implementation up and running. Could somebody help me figure out where I'm going wrong? I've configured the license server with the correct PFX files and when I run the validation t
-
I have more than 160 gb of content!
This sounds silly to me and will to you also. I have more than 160 gb of media. Does ATV have some sort of preferential treatment of the media? If it keeps most played It will not have my current newly added movie. Just trying to figure out why I wou