473,396 Members | 2,011 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

Virtual Xml DOMDocument

I would like to create a class that acts like an Xml document so that I
can pass it through an XSLT transform. But, there is never any
Document created.

Basically, what I'm trying to do, is a virtual XML layer over a
persistence framework that allows you to access a database with XPath
queries. I've already done something like this in another project and
language, but, it's too custom to pass into an XSLT transform.
Also, the database huge. I only want to read the portions in...
requested by all the XPATH stuff in the XSLT file.

So, I basically want to do something like.....

class DBDOMDoc extends DOMDocument {
var $PersistenceObject; // This object is the head of the
hierarchy...

.... override reading of the nodes, with Persistence Framework
requests (db queries )
}

$xml = new DBDOMDoc;
$xml->PersistenceObject = $someDBObj;

// Configure the transformer
$proc = new XSLTProcessor;
$proc->importStyleSheet($xsl); // attach the xsl rules

if ( $argc == 4 && $argv[3]=='dom' ){

echo $proc->transformToDoc($xml)->firstChild->wholeText;
} else {
echo $proc->transformToXml($xml);
}

Any help is appreciated....

Jan 10 '06 #1
0 1233

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Colin McGuigan | last post by:
Shorter: How do I tell DOMDocument->load() what encoding I want it to use? Longer: I search for and process XML files from elsewhere, and need to transform them with some XSLTs. No problem. ...
1
by: Mini Mouse | last post by:
Hiya folks, I'm getting the following error(s) below and I'm at a bit of a loss as to how to correct it. When I give it a parameter it then complains it needs two parameters and the second one...
3
by: hb | last post by:
Hi, I need to use MSXML2.DOMDocument in my ASP page. The following is my code: xml.asp: ===== <% dim sx sx="<root><a>text1</a><b>text2</b></root>" dim xd
3
by: Dean Slindee | last post by:
Newbie question: Any easy way to convert a DOMDocument to a System.Xml.Document? Dim DOMDocument As DOMDocument40 to this Dim xmlDoc As System.Xml.XmlDocument Thanks,
0
by: pieV | last post by:
I am using Msxml2.DOMDocument to pull xml fragments from different sibling websites. This works off the net, however during testing on my localhost, it fails if called from an external website....
2
by: Sebastian Araya | last post by:
Hello, I'm trying to create a single function to append new nodes to a DOMDocument object: public function addElement( $element, $name, $value = '', $attrs = Null ) { if( !( $created =...
0
by: paulroskilly | last post by:
Hi, Im using the DomDocument class in PHP5 to parse thru a xml file, but it keeps timing out on the load method : $dom = new DomDocument(); $dom->load("<some url>"); Browsing to the url in...
2
by: J˙Giusł vs ::NRG::ius | last post by:
Hi all. I have this script ----------------------------------------------------------- <?php $doc = new DOMDocument(); $doc->load('books.xml'); echo $doc->saveXML(); ?>
1
by: malayappa | last post by:
Hi All here is the error what i m getting Warning: domdocument::domdocument() expects parameter 2 to be long, string given in D:\Program Files\Apache Software...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.